import os
import sys
import numpy as np
import pandas as pd
import requests
import json
import matplotlib.pyplot as plt
from datetime import datetime, timedelta
stock_symbol = 'NFLX'
initial_capital = 0
# Specify the parameters for the trading strategy
fast_ma_min = 5
fast_ma_max = 20
slow_ma_min = 10
slow_ma_max = 50
ma_increment = 5
min_ma_gap = 5
model_start_date = datetime(2019, 1, 1)
print("Starting date for the model:", model_start_date)
stock_start_date = model_start_date - timedelta(days=int(slow_ma_max*1.5)) # Need more pricing data to calculate moving averages
model_end_date = datetime.now()
# model_end_date = datetime(2020, 6, 30)
print("Ending date for the model:", model_end_date)
Starting date for the model: 2019-01-01 00:00:00 Ending date for the model: 2020-07-01 22:54:50.634656
# Begin the timer for the script processing
startTimeScript = datetime.now()
# Set up the verbose flag to print detailed messages for debugging (setting True will activate!)
verbose = True
# Set up the sendNotification flag to send progress emails (setting True will send emails!)
notifyStatus = False
# Set up the parent directory location for loading the dotenv files
useColab = False
if useColab:
# Mount Google Drive locally for storing files
from dotenv import load_dotenv
from google.colab import drive
drive.mount('/content/gdrive')
gdrivePrefix = '/content/gdrive/My Drive/Colab_Downloads/'
env_path = '/content/gdrive/My Drive/Colab Notebooks/'
dotenv_path = env_path + "python_script.env"
load_dotenv(dotenv_path=dotenv_path)
# Set up the dotenv file for retrieving environment variables
useLocalPC = False
if useLocalPC:
from dotenv import load_dotenv
env_path = "/Users/david/PycharmProjects/"
dotenv_path = env_path + "python_script.env"
load_dotenv(dotenv_path=dotenv_path)
# Configure the plotting style
plt.style.use('seaborn')
# Set Pandas options
pd.set_option("display.max_rows", None)
pd.set_option("display.max_columns", None)
# pd.set_option("display.width", 140)
# Check and see whether the API key is available
quandl_key = os.environ.get('QUANDL_API')
if quandl_key is None: sys.exit("API key for Quandl not available. Script Processing Aborted!!!")
start_date_string = stock_start_date.strftime('%Y-%m-%d')
end_date_string = model_end_date.strftime('%Y-%m-%d')
quandl_url = "https://www.quandl.com/api/v3/datatables/SHARADAR/SEP.json?date.gte=%s&date.lte=%s&ticker=%s&api_key=%s" % (start_date_string, end_date_string, stock_symbol, quandl_key)
response = requests.get(quandl_url)
quandl_dict = json.loads(response.text)
stock_quandl = pd.DataFrame(quandl_dict['datatable']['data'])
print(len(stock_quandl), 'data points retrieved from the API call.')
428 data points retrieved from the API call.
stock_quandl.columns = ['ticker', 'date', 'open', 'high', 'low', 'close', 'volume', 'dividend', 'closeunadj', 'lastupdated']
# stock_quandl.set_index('date', inplace=True)
stock_quandl.index = pd.to_datetime(stock_quandl.date)
stock_quandl = stock_quandl.sort_index(ascending = True)
stock_quandl.info(verbose=True)
<class 'pandas.core.frame.DataFrame'> DatetimeIndex: 428 entries, 2018-10-18 to 2020-07-01 Data columns (total 10 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 ticker 428 non-null object 1 date 428 non-null object 2 open 428 non-null float64 3 high 428 non-null float64 4 low 428 non-null float64 5 close 428 non-null float64 6 volume 428 non-null float64 7 dividend 428 non-null float64 8 closeunadj 428 non-null float64 9 lastupdated 428 non-null object dtypes: float64(7), object(3) memory usage: 36.8+ KB
stock_quandl.head()
| ticker | date | open | high | low | close | volume | dividend | closeunadj | lastupdated | |
|---|---|---|---|---|---|---|---|---|---|---|
| date | ||||||||||
| 2018-10-18 | NFLX | 2018-10-18 | 360.673 | 362.20 | 346.05 | 346.71 | 18461040.0 | 0.0 | 346.71 | 2020-05-01 |
| 2018-10-19 | NFLX | 2018-10-19 | 351.000 | 355.80 | 332.20 | 332.67 | 16717233.0 | 0.0 | 332.67 | 2020-05-01 |
| 2018-10-22 | NFLX | 2018-10-22 | 333.100 | 335.80 | 320.34 | 329.54 | 17097175.0 | 0.0 | 329.54 | 2020-05-01 |
| 2018-10-23 | NFLX | 2018-10-23 | 318.000 | 336.58 | 316.77 | 333.16 | 14907326.0 | 0.0 | 333.16 | 2020-05-01 |
| 2018-10-24 | NFLX | 2018-10-24 | 332.280 | 333.00 | 300.73 | 301.83 | 19039297.0 | 0.0 | 301.83 | 2020-05-01 |
stock_quandl.tail()
| ticker | date | open | high | low | close | volume | dividend | closeunadj | lastupdated | |
|---|---|---|---|---|---|---|---|---|---|---|
| date | ||||||||||
| 2020-06-25 | NFLX | 2020-06-25 | 458.86 | 467.01 | 454.00 | 465.91 | 3938090.0 | 0.0 | 465.91 | 2020-06-25 |
| 2020-06-26 | NFLX | 2020-06-26 | 466.39 | 468.03 | 442.24 | 443.40 | 6804726.0 | 0.0 | 443.40 | 2020-06-26 |
| 2020-06-29 | NFLX | 2020-06-29 | 445.23 | 447.67 | 432.14 | 447.24 | 4828402.0 | 0.0 | 447.24 | 2020-06-30 |
| 2020-06-30 | NFLX | 2020-06-30 | 450.02 | 457.59 | 447.00 | 455.04 | 4167187.0 | 0.0 | 455.04 | 2020-06-30 |
| 2020-07-01 | NFLX | 2020-07-01 | 454.00 | 488.23 | 454.00 | 485.64 | 9656467.0 | 0.0 | 485.64 | 2020-07-01 |
title_string = 'Quandl Historical Stock Information for ' + stock_symbol
stock_quandl['close'].plot(figsize=(16,9), title=title_string)
plt.show()
# Set up the standard column name for modeling
model_template = stock_quandl.loc[:, ['open','close']]
model_template.rename(columns={'open': 'open_price', 'close': 'close_price'}, inplace=True)
if verbose: model_template.info(verbose=True)
<class 'pandas.core.frame.DataFrame'> DatetimeIndex: 428 entries, 2018-10-18 to 2020-07-01 Data columns (total 2 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 open_price 428 non-null float64 1 close_price 428 non-null float64 dtypes: float64(2) memory usage: 10.0 KB
def trading_ma_crossover(model):
waitfor_first_entry = True
for x in range(len(model)):
if model['ma_change'].iloc[x] > 0:
model['trade_signal'].iloc[x] = 1 # trade_signal = 1 means we should take a long position
else:
model['trade_signal'].iloc[x] = 0 # trade_signal = 0 means we should take a flat position
if x != 0:
model['signal_change'].iloc[x] = model['trade_signal'].iloc[x] - model['trade_signal'].iloc[x-1]
if waitfor_first_entry and (model['signal_change'].iloc[x-1] == 1):
model['entry_exit'].iloc[x] = model['signal_change'].iloc[x-1]
waitfor_first_entry = False
elif (not waitfor_first_entry) and (model['signal_change'].iloc[x-1] != 0):
model['entry_exit'].iloc[x] = model['signal_change'].iloc[x-1]
model_collection = {}
serial_number = 1
for slow_ma in range(slow_ma_min, slow_ma_max+1, ma_increment):
for fast_ma in range(fast_ma_min, fast_ma_max+1, ma_increment):
if (slow_ma - fast_ma) < min_ma_gap: break
print('Processing model with slow_ma of', slow_ma, 'and fast_ma of', fast_ma)
model_name = 'SMA_' + str(serial_number).zfill(3) + '_SlowMA_' + str(slow_ma).zfill(2) + '_FastMA_' + str(fast_ma).zfill(2)
serial_number = serial_number + 1
trading_model = model_template.copy()
trading_model['fast_ma'] = trading_model['close_price'].rolling(fast_ma).mean()
trading_model['slow_ma'] = trading_model['close_price'].rolling(slow_ma).mean()
trading_model['ma_change'] = trading_model['fast_ma'] - trading_model['slow_ma']
trading_model['trade_signal'] = np.zeros(len(trading_model))
trading_model['signal_change'] = np.zeros(len(trading_model))
trading_model['entry_exit'] = np.zeros(len(trading_model))
trading_model = trading_model[model_start_date:model_end_date]
trading_ma_crossover(trading_model)
model_collection[model_name] = trading_model.copy()
print('Model', model_name, 'added to the trading model collection.')
Processing model with slow_ma of 10 and fast_ma of 5 Model SMA_001_SlowMA_10_FastMA_05 added to the trading model collection. Processing model with slow_ma of 15 and fast_ma of 5 Model SMA_002_SlowMA_15_FastMA_05 added to the trading model collection. Processing model with slow_ma of 15 and fast_ma of 10 Model SMA_003_SlowMA_15_FastMA_10 added to the trading model collection. Processing model with slow_ma of 20 and fast_ma of 5 Model SMA_004_SlowMA_20_FastMA_05 added to the trading model collection. Processing model with slow_ma of 20 and fast_ma of 10 Model SMA_005_SlowMA_20_FastMA_10 added to the trading model collection. Processing model with slow_ma of 20 and fast_ma of 15 Model SMA_006_SlowMA_20_FastMA_15 added to the trading model collection. Processing model with slow_ma of 25 and fast_ma of 5 Model SMA_007_SlowMA_25_FastMA_05 added to the trading model collection. Processing model with slow_ma of 25 and fast_ma of 10 Model SMA_008_SlowMA_25_FastMA_10 added to the trading model collection. Processing model with slow_ma of 25 and fast_ma of 15 Model SMA_009_SlowMA_25_FastMA_15 added to the trading model collection. Processing model with slow_ma of 25 and fast_ma of 20 Model SMA_010_SlowMA_25_FastMA_20 added to the trading model collection. Processing model with slow_ma of 30 and fast_ma of 5 Model SMA_011_SlowMA_30_FastMA_05 added to the trading model collection. Processing model with slow_ma of 30 and fast_ma of 10 Model SMA_012_SlowMA_30_FastMA_10 added to the trading model collection. Processing model with slow_ma of 30 and fast_ma of 15 Model SMA_013_SlowMA_30_FastMA_15 added to the trading model collection. Processing model with slow_ma of 30 and fast_ma of 20 Model SMA_014_SlowMA_30_FastMA_20 added to the trading model collection. Processing model with slow_ma of 35 and fast_ma of 5 Model SMA_015_SlowMA_35_FastMA_05 added to the trading model collection. Processing model with slow_ma of 35 and fast_ma of 10 Model SMA_016_SlowMA_35_FastMA_10 added to the trading model collection. Processing model with slow_ma of 35 and fast_ma of 15 Model SMA_017_SlowMA_35_FastMA_15 added to the trading model collection. Processing model with slow_ma of 35 and fast_ma of 20 Model SMA_018_SlowMA_35_FastMA_20 added to the trading model collection. Processing model with slow_ma of 40 and fast_ma of 5 Model SMA_019_SlowMA_40_FastMA_05 added to the trading model collection. Processing model with slow_ma of 40 and fast_ma of 10 Model SMA_020_SlowMA_40_FastMA_10 added to the trading model collection. Processing model with slow_ma of 40 and fast_ma of 15 Model SMA_021_SlowMA_40_FastMA_15 added to the trading model collection. Processing model with slow_ma of 40 and fast_ma of 20 Model SMA_022_SlowMA_40_FastMA_20 added to the trading model collection. Processing model with slow_ma of 45 and fast_ma of 5 Model SMA_023_SlowMA_45_FastMA_05 added to the trading model collection. Processing model with slow_ma of 45 and fast_ma of 10 Model SMA_024_SlowMA_45_FastMA_10 added to the trading model collection. Processing model with slow_ma of 45 and fast_ma of 15 Model SMA_025_SlowMA_45_FastMA_15 added to the trading model collection. Processing model with slow_ma of 45 and fast_ma of 20 Model SMA_026_SlowMA_45_FastMA_20 added to the trading model collection. Processing model with slow_ma of 50 and fast_ma of 5 Model SMA_027_SlowMA_50_FastMA_05 added to the trading model collection. Processing model with slow_ma of 50 and fast_ma of 10 Model SMA_028_SlowMA_50_FastMA_10 added to the trading model collection. Processing model with slow_ma of 50 and fast_ma of 15 Model SMA_029_SlowMA_50_FastMA_15 added to the trading model collection. Processing model with slow_ma of 50 and fast_ma of 20 Model SMA_030_SlowMA_50_FastMA_20 added to the trading model collection.
# List the entry/exit points for each model
for key in model_collection:
print('List the signal change and entry/exit points for', key)
if verbose: print(model_collection[key][(model_collection[key].signal_change != 0) | (model_collection[key].entry_exit != 0)])
else: print(model_collection[key][model_collection[key].entry_exit != 0])
print()
List the signal change and entry/exit points for SMA_001_SlowMA_10_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-24 320.600 326.67 333.222 336.7330 -3.5110
2019-01-31 339.680 339.50 336.554 334.8880 1.6660
2019-02-01 337.180 339.85 336.914 333.5540 3.3600
2019-03-04 359.720 351.04 358.860 360.0030 -1.1430
2019-03-05 351.460 354.30 356.726 359.2410 -2.5150
2019-03-14 360.500 358.82 356.952 355.9630 0.9890
2019-03-15 361.020 361.46 359.324 356.3770 2.9470
2019-03-28 354.485 354.61 359.038 363.1960 -4.1580
2019-03-29 357.160 356.56 358.148 362.7060 -4.5580
2019-04-04 370.070 367.88 365.774 362.4060 3.3680
2019-04-05 369.000 365.49 367.560 362.8540 4.7060
2019-04-11 365.000 367.65 364.636 365.2050 -0.5690
2019-04-12 360.690 351.14 361.766 364.6630 -2.8970
2019-04-23 375.450 381.89 366.756 363.0070 3.7490
2019-04-24 381.070 374.23 369.710 363.9590 5.7510
2019-05-09 360.900 362.75 372.256 373.6370 -1.3810
2019-05-10 361.620 361.04 367.458 372.2560 -4.7980
2019-05-22 358.010 359.73 355.174 354.5520 0.6220
2019-05-23 355.500 352.21 353.754 353.4980 0.2560
2019-05-29 353.600 349.19 354.060 354.1430 -0.0830
2019-05-30 350.550 351.85 352.484 353.8290 -1.3450
2019-06-07 357.390 360.87 352.752 351.7250 1.0270
2019-06-10 363.650 352.01 355.828 351.4870 4.3410
2019-06-14 341.630 339.73 346.400 349.5760 -3.1760
2019-06-17 342.690 350.62 346.122 350.9750 -4.8530
2019-06-20 365.910 365.21 355.240 352.9340 2.3060
2019-06-21 365.000 369.21 361.136 353.7680 7.3680
2019-07-15 372.940 366.60 376.056 376.8740 -0.8180
2019-07-16 370.090 365.99 373.268 376.0130 -2.7450
2019-07-30 329.200 325.93 327.762 325.9480 1.8140
2019-07-31 325.160 322.99 328.772 322.0030 6.7690
2019-08-05 310.960 307.63 318.976 321.5060 -2.5300
2019-08-06 310.580 310.10 315.810 321.7860 -5.9760
2019-09-17 294.500 298.60 292.834 292.1440 0.6900
2019-09-18 294.990 291.56 293.492 292.1480 1.3440
2019-09-20 280.260 270.75 288.360 289.5410 -1.1810
2019-09-23 268.345 265.92 282.686 286.6990 -4.0130
2019-10-03 267.780 268.15 267.292 265.5780 1.7140
2019-10-04 268.200 272.79 269.234 265.7820 3.4520
2019-10-22 271.159 266.69 279.934 280.0390 -0.1050
2019-10-23 268.060 271.27 276.932 280.4130 -3.4810
2019-10-30 284.340 291.45 280.568 278.7500 1.8180
2019-10-31 291.000 287.41 283.750 278.1560 5.5940
2019-12-04 308.430 304.32 310.212 310.6430 -0.4310
2019-12-05 305.270 302.86 307.598 310.4130 -2.8150
2019-12-17 307.360 315.48 303.112 302.5710 0.5410
2019-12-18 316.260 320.80 307.486 304.2190 3.2670
2020-01-02 326.100 329.81 327.682 329.4630 -1.7810
2020-01-03 326.780 325.90 326.336 329.9730 -3.6370
2020-01-08 331.490 339.26 332.310 330.3350 1.9750
2020-01-09 342.000 335.66 333.480 330.5810 2.8990
2020-01-22 332.550 326.00 336.294 336.3050 -0.0110
2020-01-23 326.040 349.60 338.400 337.3390 1.0610
2020-01-24 348.460 353.16 341.308 339.0890 2.2190
2020-02-25 372.000 360.09 376.210 378.4330 -2.2230
2020-02-26 366.310 379.24 374.820 378.9880 -4.1680
2020-03-04 377.770 383.79 374.870 374.8450 0.0250
2020-03-05 381.000 372.78 375.084 373.5230 1.5610
2020-03-09 343.860 346.49 368.160 370.1920 -2.0320
2020-03-10 356.425 364.13 367.232 370.5960 -3.3640
2020-03-24 369.990 357.32 339.584 331.7975 7.7865
2020-03-25 361.020 342.39 344.968 331.0445 13.9235
2020-04-27 425.000 421.38 425.664 426.8240 -1.1600
2020-04-28 419.990 403.83 419.664 425.8520 -6.1880
2020-05-05 427.555 424.68 419.968 419.8160 0.1520
2020-05-06 429.300 434.26 424.442 421.1000 3.3420
2020-05-26 427.770 414.77 435.810 439.7860 -3.9760
2020-05-27 410.380 419.89 429.580 438.5930 -9.0130
2020-06-05 407.290 419.60 421.826 420.6280 1.1980
2020-06-08 416.000 419.49 420.540 419.6450 0.8950
2020-06-30 450.020 455.04 453.888 455.5100 -1.6220
2020-07-01 454.000 485.64 459.446 459.2970 0.1490
trade_signal signal_change entry_exit
date
2019-01-24 0.0 -1.0 0.0
2019-01-31 1.0 1.0 0.0
2019-02-01 1.0 0.0 1.0
2019-03-04 0.0 -1.0 0.0
2019-03-05 0.0 0.0 -1.0
2019-03-14 1.0 1.0 0.0
2019-03-15 1.0 0.0 1.0
2019-03-28 0.0 -1.0 0.0
2019-03-29 0.0 0.0 -1.0
2019-04-04 1.0 1.0 0.0
2019-04-05 1.0 0.0 1.0
2019-04-11 0.0 -1.0 0.0
2019-04-12 0.0 0.0 -1.0
2019-04-23 1.0 1.0 0.0
2019-04-24 1.0 0.0 1.0
2019-05-09 0.0 -1.0 0.0
2019-05-10 0.0 0.0 -1.0
2019-05-22 1.0 1.0 0.0
2019-05-23 1.0 0.0 1.0
2019-05-29 0.0 -1.0 0.0
2019-05-30 0.0 0.0 -1.0
2019-06-07 1.0 1.0 0.0
2019-06-10 1.0 0.0 1.0
2019-06-14 0.0 -1.0 0.0
2019-06-17 0.0 0.0 -1.0
2019-06-20 1.0 1.0 0.0
2019-06-21 1.0 0.0 1.0
2019-07-15 0.0 -1.0 0.0
2019-07-16 0.0 0.0 -1.0
2019-07-30 1.0 1.0 0.0
2019-07-31 1.0 0.0 1.0
2019-08-05 0.0 -1.0 0.0
2019-08-06 0.0 0.0 -1.0
2019-09-17 1.0 1.0 0.0
2019-09-18 1.0 0.0 1.0
2019-09-20 0.0 -1.0 0.0
2019-09-23 0.0 0.0 -1.0
2019-10-03 1.0 1.0 0.0
2019-10-04 1.0 0.0 1.0
2019-10-22 0.0 -1.0 0.0
2019-10-23 0.0 0.0 -1.0
2019-10-30 1.0 1.0 0.0
2019-10-31 1.0 0.0 1.0
2019-12-04 0.0 -1.0 0.0
2019-12-05 0.0 0.0 -1.0
2019-12-17 1.0 1.0 0.0
2019-12-18 1.0 0.0 1.0
2020-01-02 0.0 -1.0 0.0
2020-01-03 0.0 0.0 -1.0
2020-01-08 1.0 1.0 0.0
2020-01-09 1.0 0.0 1.0
2020-01-22 0.0 -1.0 0.0
2020-01-23 1.0 1.0 -1.0
2020-01-24 1.0 0.0 1.0
2020-02-25 0.0 -1.0 0.0
2020-02-26 0.0 0.0 -1.0
2020-03-04 1.0 1.0 0.0
2020-03-05 1.0 0.0 1.0
2020-03-09 0.0 -1.0 0.0
2020-03-10 0.0 0.0 -1.0
2020-03-24 1.0 1.0 0.0
2020-03-25 1.0 0.0 1.0
2020-04-27 0.0 -1.0 0.0
2020-04-28 0.0 0.0 -1.0
2020-05-05 1.0 1.0 0.0
2020-05-06 1.0 0.0 1.0
2020-05-26 0.0 -1.0 0.0
2020-05-27 0.0 0.0 -1.0
2020-06-05 1.0 1.0 0.0
2020-06-08 1.0 0.0 1.0
2020-06-30 0.0 -1.0 0.0
2020-07-01 1.0 1.0 -1.0
List the signal change and entry/exit points for SMA_002_SlowMA_15_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-03 270.200 271.20 263.633 262.062333 1.570667
2019-01-04 281.880 297.57 272.034 263.575000 8.459000
2019-01-25 328.720 338.05 330.194 330.568000 -0.374000
2019-01-28 334.700 335.66 329.506 333.107333 -3.601333
2019-02-04 342.600 351.34 340.050 338.602667 1.447333
2019-02-05 353.200 355.81 345.432 340.127333 5.304667
2019-03-05 351.460 354.30 356.726 358.800667 -2.074667
2019-03-06 353.600 359.61 356.074 358.776667 -2.702667
2019-03-15 361.020 361.46 359.324 358.062667 1.261333
2019-03-18 362.470 363.44 360.240 358.031333 2.208667
2019-03-28 354.485 354.61 359.038 361.114667 -2.076667
2019-03-29 357.160 356.56 358.148 361.578667 -3.430667
2019-04-04 370.070 367.88 365.774 364.055333 1.718667
2019-04-05 369.000 365.49 367.560 364.324000 3.236000
2019-04-12 360.690 351.14 361.766 362.491333 -0.725333
2019-04-15 350.710 348.87 359.258 361.334000 -2.076000
2019-04-23 375.450 381.89 366.756 364.154667 2.601333
2019-04-24 381.070 374.23 369.710 364.588667 5.121333
2019-05-09 360.900 362.75 372.256 373.234000 -0.978000
2019-05-10 361.620 361.04 367.458 373.280000 -5.822000
2019-06-07 357.390 360.87 352.752 352.401333 0.350667
2019-06-10 363.650 352.01 355.828 352.238667 3.589333
2019-06-13 347.230 343.43 350.628 350.782000 -0.154000
2019-06-14 341.630 339.73 346.400 349.950000 -3.550000
2019-06-19 361.720 363.52 350.884 350.810000 0.074000
2019-06-20 365.910 365.21 355.240 351.700667 3.539333
2019-07-17 366.250 362.44 369.556 373.114000 -3.558000
2019-07-18 323.760 325.21 358.698 370.648000 -11.950000
2019-09-17 294.500 298.60 292.834 292.270667 0.563333
2019-09-18 294.990 291.56 293.492 292.306000 1.186000
2019-09-20 280.260 270.75 288.360 290.226000 -1.866000
2019-09-23 268.345 265.92 282.686 288.370667 -5.684667
2019-10-08 273.030 270.72 270.830 270.127333 0.702667
2019-10-09 270.020 267.53 270.730 268.525333 2.204667
2019-10-23 268.060 271.27 276.932 277.185333 -0.253333
2019-10-24 271.810 271.50 272.562 277.408667 -4.846667
2019-10-30 284.340 291.45 280.568 280.464667 0.103333
2019-10-31 291.000 287.41 283.750 280.926667 2.823333
2019-12-06 304.700 307.35 306.136 307.789333 -1.653333
2019-12-09 307.350 302.50 304.638 308.287333 -3.649333
2019-12-18 316.260 320.80 307.486 306.216667 1.269333
2019-12-19 324.500 332.22 314.242 307.302667 6.939333
2020-02-26 366.310 379.24 374.820 375.868667 -1.048667
2020-02-27 371.460 371.71 371.962 376.004667 -4.042667
2020-03-25 361.020 342.39 344.968 340.849000 4.119000
2020-03-26 344.000 362.99 351.160 340.196333 10.963667
2020-04-30 410.310 419.85 416.388 418.083333 -1.695333
2020-05-01 415.100 415.27 414.444 421.053333 -6.609333
2020-05-06 429.300 434.26 424.442 424.391333 0.050667
2020-05-07 436.890 436.53 427.778 424.215333 3.562667
2020-05-26 427.770 414.77 435.810 437.960000 -2.150000
2020-05-27 410.380 419.89 429.580 437.640667 -8.060667
2020-06-11 428.200 425.56 426.636 423.740667 2.895333
2020-06-12 429.000 418.07 426.330 422.528667 3.801333
trade_signal signal_change entry_exit
date
2019-01-03 1.0 1.0 0.0
2019-01-04 1.0 0.0 1.0
2019-01-25 0.0 -1.0 0.0
2019-01-28 0.0 0.0 -1.0
2019-02-04 1.0 1.0 0.0
2019-02-05 1.0 0.0 1.0
2019-03-05 0.0 -1.0 0.0
2019-03-06 0.0 0.0 -1.0
2019-03-15 1.0 1.0 0.0
2019-03-18 1.0 0.0 1.0
2019-03-28 0.0 -1.0 0.0
2019-03-29 0.0 0.0 -1.0
2019-04-04 1.0 1.0 0.0
2019-04-05 1.0 0.0 1.0
2019-04-12 0.0 -1.0 0.0
2019-04-15 0.0 0.0 -1.0
2019-04-23 1.0 1.0 0.0
2019-04-24 1.0 0.0 1.0
2019-05-09 0.0 -1.0 0.0
2019-05-10 0.0 0.0 -1.0
2019-06-07 1.0 1.0 0.0
2019-06-10 1.0 0.0 1.0
2019-06-13 0.0 -1.0 0.0
2019-06-14 0.0 0.0 -1.0
2019-06-19 1.0 1.0 0.0
2019-06-20 1.0 0.0 1.0
2019-07-17 0.0 -1.0 0.0
2019-07-18 0.0 0.0 -1.0
2019-09-17 1.0 1.0 0.0
2019-09-18 1.0 0.0 1.0
2019-09-20 0.0 -1.0 0.0
2019-09-23 0.0 0.0 -1.0
2019-10-08 1.0 1.0 0.0
2019-10-09 1.0 0.0 1.0
2019-10-23 0.0 -1.0 0.0
2019-10-24 0.0 0.0 -1.0
2019-10-30 1.0 1.0 0.0
2019-10-31 1.0 0.0 1.0
2019-12-06 0.0 -1.0 0.0
2019-12-09 0.0 0.0 -1.0
2019-12-18 1.0 1.0 0.0
2019-12-19 1.0 0.0 1.0
2020-02-26 0.0 -1.0 0.0
2020-02-27 0.0 0.0 -1.0
2020-03-25 1.0 1.0 0.0
2020-03-26 1.0 0.0 1.0
2020-04-30 0.0 -1.0 0.0
2020-05-01 0.0 0.0 -1.0
2020-05-06 1.0 1.0 0.0
2020-05-07 1.0 0.0 1.0
2020-05-26 0.0 -1.0 0.0
2020-05-27 0.0 0.0 -1.0
2020-06-11 1.0 1.0 0.0
2020-06-12 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_003_SlowMA_15_FastMA_10
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-07 302.100 315.34 266.5015 266.196333 0.305167
2019-01-08 319.980 320.27 273.8895 269.758333 4.131167
2019-01-31 339.680 339.50 334.8880 336.673333 -1.785333
2019-02-01 337.180 339.85 333.5540 337.686000 -4.132000
2019-02-06 357.000 352.19 340.8630 339.964000 0.899000
2019-02-07 347.900 344.71 342.6670 339.518667 3.148333
2019-03-07 360.160 352.60 358.7740 358.832000 -0.058000
2019-03-08 345.750 349.60 357.4320 358.200667 -0.768667
2019-03-19 366.400 358.78 358.0650 357.618667 0.446333
2019-03-20 358.910 375.22 359.6260 358.442000 1.184000
2019-04-03 369.260 369.75 363.4050 363.451333 -0.046333
2019-04-04 370.070 367.88 362.4060 364.055333 -1.649333
2019-04-10 365.790 363.92 363.9010 363.830667 0.070333
2019-04-11 365.000 367.65 365.2050 363.149333 2.055667
2019-04-17 365.050 354.74 360.5270 361.391333 -0.864333
2019-04-18 355.000 360.35 359.7740 361.774000 -2.000000
2019-04-26 368.350 374.85 365.1200 364.958667 0.161333
2019-04-29 373.680 371.83 367.1890 365.381333 1.807667
2019-05-10 361.620 361.04 372.2560 373.280000 -1.024000
2019-05-13 352.290 345.26 369.5990 371.141333 -1.542333
2019-06-17 342.690 350.62 350.9750 349.698667 1.276333
2019-06-18 355.570 357.12 351.3470 349.854667 1.492333
2019-06-24 370.270 371.04 355.6710 355.723333 -0.052333
2019-06-25 370.750 360.30 356.5740 356.183333 0.390667
2019-06-26 361.600 362.20 358.2380 356.614667 1.623333
2019-07-18 323.760 325.21 369.0630 370.648000 -1.585000
2019-07-19 323.400 315.10 362.5180 366.986667 -4.468667
2019-08-07 302.560 304.29 320.4210 318.692000 1.729000
2019-08-08 311.030 315.90 319.3650 318.071333 1.293667
2019-08-09 313.740 308.93 316.6800 317.660000 -0.980000
2019-08-12 305.460 310.83 314.4930 317.674000 -3.181000
2019-10-09 270.020 267.53 268.5270 268.525333 0.001667
2019-10-10 265.970 280.48 270.2440 268.117333 2.126667
2019-10-29 281.870 281.21 278.2330 278.870000 -0.637000
2019-10-30 284.340 291.45 278.7500 280.464667 -1.714667
2019-11-05 289.990 288.03 282.9220 281.926000 0.996000
2019-11-06 288.190 288.59 284.6540 282.080000 2.574000
2019-12-10 296.120 293.12 306.9380 307.657333 -0.719333
2019-12-11 294.490 298.93 305.5820 307.412667 -1.830667
2019-12-20 335.000 336.90 310.1100 308.785333 1.324667
2019-12-23 337.760 333.10 313.1700 310.326000 2.844000
2020-01-09 342.000 335.66 330.5810 330.802000 -0.221000
2020-01-10 337.130 329.05 330.2230 331.352000 -1.129000
2020-01-14 344.400 338.69 332.7440 331.918000 0.826000
2020-01-15 338.680 339.07 334.2940 332.316000 1.978000
2020-03-02 373.110 381.05 376.9860 377.095333 -0.109333
2020-03-03 381.030 368.77 375.0850 376.942000 -1.857000
2020-03-30 363.000 370.96 345.1130 341.037667 4.075333
2020-03-31 367.930 375.50 350.6880 341.795667 8.892333
2020-05-04 417.780 428.15 420.7310 423.148667 -2.417667
2020-05-05 427.555 424.68 419.8160 423.890667 -4.074667
2020-05-12 442.000 431.82 427.8520 425.122667 2.729333
2020-05-13 435.690 438.27 430.4900 426.246000 4.244000
2020-05-28 417.240 413.44 436.1100 436.252667 -0.142667
2020-05-29 417.460 419.73 433.8880 435.132667 -1.244667
2020-06-11 428.200 425.56 424.2440 423.740667 0.503333
2020-06-12 429.000 418.07 424.0780 422.528667 1.549333
trade_signal signal_change entry_exit
date
2019-01-07 1.0 1.0 0.0
2019-01-08 1.0 0.0 1.0
2019-01-31 0.0 -1.0 0.0
2019-02-01 0.0 0.0 -1.0
2019-02-06 1.0 1.0 0.0
2019-02-07 1.0 0.0 1.0
2019-03-07 0.0 -1.0 0.0
2019-03-08 0.0 0.0 -1.0
2019-03-19 1.0 1.0 0.0
2019-03-20 1.0 0.0 1.0
2019-04-03 0.0 -1.0 0.0
2019-04-04 0.0 0.0 -1.0
2019-04-10 1.0 1.0 0.0
2019-04-11 1.0 0.0 1.0
2019-04-17 0.0 -1.0 0.0
2019-04-18 0.0 0.0 -1.0
2019-04-26 1.0 1.0 0.0
2019-04-29 1.0 0.0 1.0
2019-05-10 0.0 -1.0 0.0
2019-05-13 0.0 0.0 -1.0
2019-06-17 1.0 1.0 0.0
2019-06-18 1.0 0.0 1.0
2019-06-24 0.0 -1.0 0.0
2019-06-25 1.0 1.0 -1.0
2019-06-26 1.0 0.0 1.0
2019-07-18 0.0 -1.0 0.0
2019-07-19 0.0 0.0 -1.0
2019-08-07 1.0 1.0 0.0
2019-08-08 1.0 0.0 1.0
2019-08-09 0.0 -1.0 0.0
2019-08-12 0.0 0.0 -1.0
2019-10-09 1.0 1.0 0.0
2019-10-10 1.0 0.0 1.0
2019-10-29 0.0 -1.0 0.0
2019-10-30 0.0 0.0 -1.0
2019-11-05 1.0 1.0 0.0
2019-11-06 1.0 0.0 1.0
2019-12-10 0.0 -1.0 0.0
2019-12-11 0.0 0.0 -1.0
2019-12-20 1.0 1.0 0.0
2019-12-23 1.0 0.0 1.0
2020-01-09 0.0 -1.0 0.0
2020-01-10 0.0 0.0 -1.0
2020-01-14 1.0 1.0 0.0
2020-01-15 1.0 0.0 1.0
2020-03-02 0.0 -1.0 0.0
2020-03-03 0.0 0.0 -1.0
2020-03-30 1.0 1.0 0.0
2020-03-31 1.0 0.0 1.0
2020-05-04 0.0 -1.0 0.0
2020-05-05 0.0 0.0 -1.0
2020-05-12 1.0 1.0 0.0
2020-05-13 1.0 0.0 1.0
2020-05-28 0.0 -1.0 0.0
2020-05-29 0.0 0.0 -1.0
2020-06-11 1.0 1.0 0.0
2020-06-12 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_004_SlowMA_20_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-04 281.880 297.57 272.034 265.57725 6.45675
2019-01-07 302.100 315.34 283.886 267.20025 16.68575
2019-03-06 353.600 359.61 356.074 356.59100 -0.51700
2019-03-07 360.160 352.60 354.974 356.61150 -1.63750
2019-03-15 361.020 361.46 359.324 358.48150 0.84250
2019-03-18 362.470 363.44 360.240 358.81000 1.43000
2019-03-28 354.485 354.61 359.038 359.57950 -0.54150
2019-03-29 357.160 356.56 358.148 359.54150 -1.39350
2019-04-03 369.260 369.75 363.120 361.51550 1.60450
2019-04-04 370.070 367.88 365.774 362.27950 3.49450
2019-04-12 360.690 351.14 361.766 363.68450 -1.91850
2019-04-15 350.710 348.87 359.258 362.95600 -3.69800
2019-04-23 375.450 381.89 366.756 362.68950 4.06650
2019-04-24 381.070 374.23 369.710 363.40250 6.30750
2019-05-10 361.620 361.04 367.458 368.68800 -1.23000
2019-05-13 352.290 345.26 360.776 368.39400 -7.61800
2019-06-07 357.390 360.87 352.752 352.61150 0.14050
2019-06-10 363.650 352.01 355.828 352.16000 3.66800
2019-06-13 347.230 343.43 350.628 351.88000 -1.25200
2019-06-14 341.630 339.73 346.400 350.90100 -4.50100
2019-06-20 365.910 365.21 355.240 351.89650 3.34350
2019-06-21 365.000 369.21 361.136 352.74650 8.38950
2019-07-17 366.250 362.44 369.556 371.29950 -1.74350
2019-07-18 323.760 325.21 358.698 369.38400 -10.68600
2019-09-18 294.990 291.56 293.492 292.83900 0.65300
2019-09-19 291.560 286.60 293.040 292.27850 0.76150
2019-09-20 280.260 270.75 288.360 290.96950 -2.60950
2019-09-23 268.345 265.92 282.686 289.69350 -7.00750
2019-10-11 284.800 282.93 275.224 273.78700 1.43700
2019-10-14 283.930 285.53 277.438 273.34900 4.08900
2019-10-24 271.810 271.50 272.562 274.87950 -2.31750
2019-10-25 270.680 276.82 272.866 275.56650 -2.70050
2019-10-30 284.340 291.45 280.568 278.03100 2.53700
2019-10-31 291.000 287.41 283.750 278.99400 4.75600
2019-12-10 296.120 293.12 302.030 303.86000 -1.83000
2019-12-11 294.490 298.93 300.952 304.20600 -3.25400
2019-12-18 316.260 320.80 307.486 307.43100 0.05500
2019-12-19 324.500 332.22 314.242 308.78400 5.45800
2020-02-28 364.210 369.03 369.754 372.54350 -2.78950
2020-03-02 373.110 381.05 372.224 374.34150 -2.11750
2020-03-26 344.000 362.99 351.160 348.91825 2.24175
2020-03-27 359.090 357.12 356.018 348.32275 7.69525
2020-05-27 410.380 419.89 429.580 433.22250 -3.64250
2020-05-28 417.240 413.44 422.734 433.30000 -10.56600
2020-06-16 425.760 436.13 427.948 426.72600 1.22200
2020-06-17 441.820 447.77 430.606 426.56250 4.04350
trade_signal signal_change entry_exit
date
2019-01-04 1.0 1.0 0.0
2019-01-07 1.0 0.0 1.0
2019-03-06 0.0 -1.0 0.0
2019-03-07 0.0 0.0 -1.0
2019-03-15 1.0 1.0 0.0
2019-03-18 1.0 0.0 1.0
2019-03-28 0.0 -1.0 0.0
2019-03-29 0.0 0.0 -1.0
2019-04-03 1.0 1.0 0.0
2019-04-04 1.0 0.0 1.0
2019-04-12 0.0 -1.0 0.0
2019-04-15 0.0 0.0 -1.0
2019-04-23 1.0 1.0 0.0
2019-04-24 1.0 0.0 1.0
2019-05-10 0.0 -1.0 0.0
2019-05-13 0.0 0.0 -1.0
2019-06-07 1.0 1.0 0.0
2019-06-10 1.0 0.0 1.0
2019-06-13 0.0 -1.0 0.0
2019-06-14 0.0 0.0 -1.0
2019-06-20 1.0 1.0 0.0
2019-06-21 1.0 0.0 1.0
2019-07-17 0.0 -1.0 0.0
2019-07-18 0.0 0.0 -1.0
2019-09-18 1.0 1.0 0.0
2019-09-19 1.0 0.0 1.0
2019-09-20 0.0 -1.0 0.0
2019-09-23 0.0 0.0 -1.0
2019-10-11 1.0 1.0 0.0
2019-10-14 1.0 0.0 1.0
2019-10-24 0.0 -1.0 0.0
2019-10-25 0.0 0.0 -1.0
2019-10-30 1.0 1.0 0.0
2019-10-31 1.0 0.0 1.0
2019-12-10 0.0 -1.0 0.0
2019-12-11 0.0 0.0 -1.0
2019-12-18 1.0 1.0 0.0
2019-12-19 1.0 0.0 1.0
2020-02-28 0.0 -1.0 0.0
2020-03-02 0.0 0.0 -1.0
2020-03-26 1.0 1.0 0.0
2020-03-27 1.0 0.0 1.0
2020-05-27 0.0 -1.0 0.0
2020-05-28 0.0 0.0 -1.0
2020-06-16 1.0 1.0 0.0
2020-06-17 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_005_SlowMA_20_FastMA_10
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-08 319.98 320.27 273.8895 269.95675 3.93275
2019-01-09 317.71 319.96 282.4975 272.46975 10.02775
2019-02-04 342.60 351.34 334.7780 334.84300 -0.06500
2019-02-05 353.20 355.81 337.8430 336.86650 0.97650
2019-02-06 357.00 352.19 340.8630 338.46250 2.40050
2019-03-11 352.00 358.86 356.9270 357.42050 -0.49350
2019-03-12 359.37 356.27 356.0570 357.94750 -1.89050
2019-03-20 358.91 375.22 359.6260 359.41850 0.20750
2019-03-21 374.00 377.87 362.1530 360.46350 1.68950
2019-04-05 369.00 365.49 362.8540 363.07400 -0.22000
2019-04-08 365.11 361.41 362.3720 363.20150 -0.82950
2019-04-10 365.79 363.92 363.9010 363.75900 0.14200
2019-04-11 365.00 367.65 365.2050 364.20050 1.00450
2019-04-15 350.71 348.87 362.8540 362.95600 -0.10200
2019-04-16 355.00 359.46 362.0280 362.99000 -0.96200
2019-04-23 375.45 381.89 363.0070 362.68950 0.31750
2019-04-24 381.07 374.23 363.9590 363.40250 0.55650
2019-04-26 368.35 374.85 365.1200 365.16250 -0.04250
2019-04-29 373.68 371.83 367.1890 365.92600 1.26300
2019-04-30 369.56 370.54 369.3560 366.10500 3.25100
2019-05-14 348.71 345.61 367.1060 368.23100 -1.12500
2019-05-15 343.34 354.99 364.7240 368.00750 -3.28350
2019-06-17 342.69 350.62 350.9750 350.70950 0.26550
2019-06-18 355.57 357.12 351.3470 351.16000 0.18700
2019-07-18 323.76 325.21 369.0630 369.38400 -0.32100
2019-07-19 323.40 315.10 362.5180 366.87850 -4.36050
2019-10-14 283.93 285.53 274.0200 273.34900 0.67100
2019-10-15 283.82 284.25 275.4870 272.63150 2.85550
2019-10-31 291.00 287.41 278.1560 278.99400 -0.83800
2019-11-01 288.70 286.81 279.3070 279.69500 -0.38800
2019-11-04 288.00 292.86 280.7880 280.61500 0.17300
2019-11-05 289.99 288.03 282.9220 281.48050 1.44150
2019-12-12 295.67 298.44 303.8330 304.97250 -1.13950
2019-12-13 298.50 298.50 302.2170 305.41650 -3.19950
2019-12-20 335.00 336.90 310.1100 310.04450 0.06550
2019-12-23 337.76 333.10 313.1700 311.17550 1.99450
2020-03-04 377.77 383.79 374.8450 375.61900 -0.77400
2020-03-05 381.00 372.78 373.5230 375.77450 -2.25150
2020-03-31 367.93 375.50 350.6880 348.15475 2.53325
2020-04-01 376.05 364.08 355.5490 347.16925 8.37975
2020-05-08 434.14 435.55 423.1390 423.74850 -0.60950
2020-05-11 436.33 440.52 425.0530 425.93850 -0.88550
2020-05-12 442.00 431.82 427.8520 426.85200 1.00000
2020-05-13 435.69 438.27 430.4900 427.42800 3.06200
2020-06-01 418.83 425.92 431.0610 433.82650 -2.76550
2020-06-02 425.87 427.31 428.5340 433.78450 -5.25050
2020-06-17 441.82 447.77 427.4980 426.56250 0.93550
2020-06-18 448.73 449.87 431.0520 426.67250 4.37950
trade_signal signal_change entry_exit
date
2019-01-08 1.0 1.0 0.0
2019-01-09 1.0 0.0 1.0
2019-02-04 0.0 -1.0 0.0
2019-02-05 1.0 1.0 -1.0
2019-02-06 1.0 0.0 1.0
2019-03-11 0.0 -1.0 0.0
2019-03-12 0.0 0.0 -1.0
2019-03-20 1.0 1.0 0.0
2019-03-21 1.0 0.0 1.0
2019-04-05 0.0 -1.0 0.0
2019-04-08 0.0 0.0 -1.0
2019-04-10 1.0 1.0 0.0
2019-04-11 1.0 0.0 1.0
2019-04-15 0.0 -1.0 0.0
2019-04-16 0.0 0.0 -1.0
2019-04-23 1.0 1.0 0.0
2019-04-24 1.0 0.0 1.0
2019-04-26 0.0 -1.0 0.0
2019-04-29 1.0 1.0 -1.0
2019-04-30 1.0 0.0 1.0
2019-05-14 0.0 -1.0 0.0
2019-05-15 0.0 0.0 -1.0
2019-06-17 1.0 1.0 0.0
2019-06-18 1.0 0.0 1.0
2019-07-18 0.0 -1.0 0.0
2019-07-19 0.0 0.0 -1.0
2019-10-14 1.0 1.0 0.0
2019-10-15 1.0 0.0 1.0
2019-10-31 0.0 -1.0 0.0
2019-11-01 0.0 0.0 -1.0
2019-11-04 1.0 1.0 0.0
2019-11-05 1.0 0.0 1.0
2019-12-12 0.0 -1.0 0.0
2019-12-13 0.0 0.0 -1.0
2019-12-20 1.0 1.0 0.0
2019-12-23 1.0 0.0 1.0
2020-03-04 0.0 -1.0 0.0
2020-03-05 0.0 0.0 -1.0
2020-03-31 1.0 1.0 0.0
2020-04-01 1.0 0.0 1.0
2020-05-08 0.0 -1.0 0.0
2020-05-11 0.0 0.0 -1.0
2020-05-12 1.0 1.0 0.0
2020-05-13 1.0 0.0 1.0
2020-06-01 0.0 -1.0 0.0
2020-06-02 0.0 0.0 -1.0
2020-06-17 1.0 1.0 0.0
2020-06-18 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_006_SlowMA_20_FastMA_15
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-09 317.710 319.96 273.569000 272.46975 1.099250
2019-01-10 314.570 324.66 277.150333 275.43675 1.713583
2019-02-07 347.900 344.71 339.518667 339.70000 -0.181333
2019-02-08 338.000 347.57 339.144000 340.84550 -1.701500
2019-02-13 357.300 351.77 343.892000 342.46050 1.431500
2019-02-14 351.750 359.07 346.052000 342.84450 3.207500
2019-03-14 360.500 358.82 358.166667 358.36200 -0.195333
2019-03-15 361.020 361.46 358.062667 358.48150 -0.418833
2019-03-25 359.000 366.23 361.018667 360.47900 0.539667
2019-03-26 367.870 359.97 361.396667 360.22900 1.167667
2019-04-11 365.000 367.65 363.149333 364.20050 -1.051167
2019-04-12 360.690 351.14 362.491333 363.68450 -1.193167
2019-04-18 355.000 360.35 361.774000 361.09000 0.684000
2019-04-22 359.700 377.34 363.159333 361.90650 1.252833
2019-04-26 368.350 374.85 364.958667 365.16250 -0.203833
2019-04-29 373.680 371.83 365.381333 365.92600 -0.544667
2019-05-01 374.000 378.81 366.930000 366.65950 0.270500
2019-05-02 378.000 379.06 367.939333 367.12500 0.814333
2019-05-15 343.340 354.99 367.440000 368.00750 -0.567500
2019-05-16 356.370 359.31 366.838667 368.23600 -1.397333
2019-06-10 363.650 352.01 352.238667 352.16000 0.078667
2019-06-11 355.000 351.27 352.449333 352.46050 -0.011167
2019-06-12 351.820 345.56 351.868667 352.45800 -0.589333
2019-06-21 365.000 369.21 353.429333 352.74650 0.682833
2019-06-24 370.270 371.04 355.723333 353.57900 2.144333
2019-07-22 312.000 310.62 363.206667 363.94900 -0.742333
2019-07-23 311.440 307.30 358.720000 360.76200 -2.042000
2019-08-14 308.010 299.11 316.750667 316.37150 0.379167
2019-08-15 299.500 295.76 314.704000 314.89900 -0.195000
2019-08-16 298.860 302.80 312.505333 314.28400 -1.778667
2019-10-16 283.120 286.28 273.649333 272.36750 1.281833
2019-10-17 304.490 293.35 275.652000 272.70500 2.947000
2019-11-06 288.190 288.59 282.080000 282.53350 -0.453500
2019-11-07 290.700 289.57 281.828000 282.98800 -1.160000
2019-11-11 289.160 294.18 283.988000 283.85250 0.135500
2019-11-12 295.320 292.01 285.676000 284.24050 1.435500
2019-12-16 300.850 304.21 305.667333 305.87550 -0.208167
2019-12-17 307.360 315.48 305.662667 306.52100 -0.858333
2019-12-24 334.010 333.20 312.128667 312.05800 0.070667
2019-12-26 334.600 332.63 314.016000 313.06500 0.951000
2020-01-17 341.000 339.67 333.146667 333.26250 -0.115833
2020-01-21 340.000 338.11 333.748000 333.55700 0.191000
2020-01-22 332.550 326.00 333.927333 333.01200 0.915333
2020-03-09 343.860 346.49 374.044000 374.86150 -0.817500
2020-03-10 356.425 364.13 372.467333 374.51450 -2.047167
2020-04-03 367.360 361.76 348.092667 346.67375 1.418917
2020-04-06 365.220 379.96 353.500667 348.34725 5.153417
2020-05-11 436.330 440.52 425.256667 425.93850 -0.681833
2020-05-12 442.000 431.82 425.122667 426.85200 -1.729333
2020-05-15 440.700 454.19 429.209333 429.12850 0.080833
2020-05-18 451.160 452.58 431.289333 429.88300 1.406333
2020-06-02 425.870 427.31 433.610000 433.78450 -0.174500
2020-06-03 426.950 421.97 432.953333 433.64900 -0.695667
2020-06-18 448.730 449.87 427.985333 426.67250 1.312833
2020-06-19 449.120 453.72 430.251333 427.54600 2.705333
trade_signal signal_change entry_exit
date
2019-01-09 1.0 1.0 0.0
2019-01-10 1.0 0.0 1.0
2019-02-07 0.0 -1.0 0.0
2019-02-08 0.0 0.0 -1.0
2019-02-13 1.0 1.0 0.0
2019-02-14 1.0 0.0 1.0
2019-03-14 0.0 -1.0 0.0
2019-03-15 0.0 0.0 -1.0
2019-03-25 1.0 1.0 0.0
2019-03-26 1.0 0.0 1.0
2019-04-11 0.0 -1.0 0.0
2019-04-12 0.0 0.0 -1.0
2019-04-18 1.0 1.0 0.0
2019-04-22 1.0 0.0 1.0
2019-04-26 0.0 -1.0 0.0
2019-04-29 0.0 0.0 -1.0
2019-05-01 1.0 1.0 0.0
2019-05-02 1.0 0.0 1.0
2019-05-15 0.0 -1.0 0.0
2019-05-16 0.0 0.0 -1.0
2019-06-10 1.0 1.0 0.0
2019-06-11 0.0 -1.0 1.0
2019-06-12 0.0 0.0 -1.0
2019-06-21 1.0 1.0 0.0
2019-06-24 1.0 0.0 1.0
2019-07-22 0.0 -1.0 0.0
2019-07-23 0.0 0.0 -1.0
2019-08-14 1.0 1.0 0.0
2019-08-15 0.0 -1.0 1.0
2019-08-16 0.0 0.0 -1.0
2019-10-16 1.0 1.0 0.0
2019-10-17 1.0 0.0 1.0
2019-11-06 0.0 -1.0 0.0
2019-11-07 0.0 0.0 -1.0
2019-11-11 1.0 1.0 0.0
2019-11-12 1.0 0.0 1.0
2019-12-16 0.0 -1.0 0.0
2019-12-17 0.0 0.0 -1.0
2019-12-24 1.0 1.0 0.0
2019-12-26 1.0 0.0 1.0
2020-01-17 0.0 -1.0 0.0
2020-01-21 1.0 1.0 -1.0
2020-01-22 1.0 0.0 1.0
2020-03-09 0.0 -1.0 0.0
2020-03-10 0.0 0.0 -1.0
2020-04-03 1.0 1.0 0.0
2020-04-06 1.0 0.0 1.0
2020-05-11 0.0 -1.0 0.0
2020-05-12 0.0 0.0 -1.0
2020-05-15 1.0 1.0 0.0
2020-05-18 1.0 0.0 1.0
2020-06-02 0.0 -1.0 0.0
2020-06-03 0.0 0.0 -1.0
2020-06-18 1.0 1.0 0.0
2020-06-19 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_007_SlowMA_25_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-04 281.880 297.57 272.034 269.3882 2.6458
2019-01-07 302.100 315.34 283.886 270.6958 13.1902
2019-03-08 345.750 349.60 353.430 355.2408 -1.8108
2019-03-11 352.000 358.86 354.994 356.0012 -1.0072
2019-03-14 360.500 358.82 356.952 356.6796 0.2724
2019-03-15 361.020 361.46 359.324 357.3496 1.9744
2019-03-28 354.485 354.61 359.038 360.1784 -1.1404
2019-03-29 357.160 356.56 358.148 359.9200 -1.7720
2019-04-03 369.260 369.75 363.120 360.4272 2.6928
2019-04-04 370.070 367.88 365.774 360.8184 4.9556
2019-04-12 360.690 351.14 361.766 362.8124 -1.0464
2019-04-15 350.710 348.87 359.258 362.4128 -3.1548
2019-04-23 375.450 381.89 366.756 363.7160 3.0400
2019-04-24 381.070 374.23 369.710 364.3340 5.3760
2019-05-10 361.620 361.04 367.458 367.8776 -0.4196
2019-05-13 352.290 345.26 360.776 367.0684 -6.2924
2019-06-10 363.650 352.01 355.828 355.2196 0.6084
2019-06-11 355.000 351.27 355.402 354.1236 1.2784
2019-06-13 347.230 343.43 350.628 352.2900 -1.6620
2019-06-14 341.630 339.73 346.400 351.3692 -4.9692
2019-06-20 365.910 365.21 355.240 352.5520 2.6880
2019-06-21 365.000 369.21 361.136 352.9480 8.1880
2019-07-18 323.760 325.21 358.698 365.6840 -6.9860
2019-07-19 323.400 315.10 347.068 364.5508 -17.4828
2019-10-14 283.930 285.53 277.438 276.8216 0.6164
2019-10-15 283.820 284.25 280.144 276.6720 3.4720
2019-10-24 271.810 271.50 272.562 272.6764 -0.1144
2019-10-25 270.680 276.82 272.866 272.9192 -0.0532
2019-10-28 278.050 281.86 273.628 273.5568 0.0712
2019-10-29 281.870 281.21 276.532 274.6216 1.9104
2019-12-11 294.490 298.93 300.952 301.6016 -0.6496
2019-12-12 295.670 298.44 300.068 301.9956 -1.9276
2019-12-18 316.260 320.80 307.486 304.8620 2.6240
2019-12-19 324.500 332.22 314.242 306.8264 7.4156
2020-03-09 343.860 346.49 368.160 373.1052 -4.9452
2020-03-10 356.425 364.13 367.232 373.3504 -6.1184
2020-03-27 359.090 357.12 356.018 352.6090 3.4090
2020-03-30 363.000 370.96 358.156 352.6994 5.4566
2020-05-27 410.380 419.89 429.580 430.5108 -0.9308
2020-05-28 417.240 413.44 422.734 430.1916 -7.4576
2020-06-18 448.730 449.87 435.468 431.2352 4.2328
2020-06-19 449.120 453.72 442.598 431.7060 10.8920
trade_signal signal_change entry_exit
date
2019-01-04 1.0 1.0 0.0
2019-01-07 1.0 0.0 1.0
2019-03-08 0.0 -1.0 0.0
2019-03-11 0.0 0.0 -1.0
2019-03-14 1.0 1.0 0.0
2019-03-15 1.0 0.0 1.0
2019-03-28 0.0 -1.0 0.0
2019-03-29 0.0 0.0 -1.0
2019-04-03 1.0 1.0 0.0
2019-04-04 1.0 0.0 1.0
2019-04-12 0.0 -1.0 0.0
2019-04-15 0.0 0.0 -1.0
2019-04-23 1.0 1.0 0.0
2019-04-24 1.0 0.0 1.0
2019-05-10 0.0 -1.0 0.0
2019-05-13 0.0 0.0 -1.0
2019-06-10 1.0 1.0 0.0
2019-06-11 1.0 0.0 1.0
2019-06-13 0.0 -1.0 0.0
2019-06-14 0.0 0.0 -1.0
2019-06-20 1.0 1.0 0.0
2019-06-21 1.0 0.0 1.0
2019-07-18 0.0 -1.0 0.0
2019-07-19 0.0 0.0 -1.0
2019-10-14 1.0 1.0 0.0
2019-10-15 1.0 0.0 1.0
2019-10-24 0.0 -1.0 0.0
2019-10-25 0.0 0.0 -1.0
2019-10-28 1.0 1.0 0.0
2019-10-29 1.0 0.0 1.0
2019-12-11 0.0 -1.0 0.0
2019-12-12 0.0 0.0 -1.0
2019-12-18 1.0 1.0 0.0
2019-12-19 1.0 0.0 1.0
2020-03-09 0.0 -1.0 0.0
2020-03-10 0.0 0.0 -1.0
2020-03-27 1.0 1.0 0.0
2020-03-30 1.0 0.0 1.0
2020-05-27 0.0 -1.0 0.0
2020-05-28 0.0 0.0 -1.0
2020-06-18 1.0 1.0 0.0
2020-06-19 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_008_SlowMA_25_FastMA_10
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-08 319.98 320.27 273.8895 271.9566 1.9329
2019-01-09 317.71 319.96 282.4975 273.3098 9.1877
2019-03-12 359.37 356.27 356.0570 356.1984 -0.1414
2019-03-13 355.81 361.21 355.8910 356.4144 -0.5234
2019-03-20 358.91 375.22 359.6260 359.1164 0.5096
2019-03-21 374.00 377.87 362.1530 360.1604 1.9926
2019-04-16 355.00 359.46 362.0280 362.5404 -0.5124
2019-04-17 365.05 354.74 360.5270 362.2816 -1.7546
2019-04-25 374.49 368.33 364.4000 364.0584 0.3416
2019-04-26 368.35 374.85 365.1200 363.9376 1.1824
2019-05-15 343.34 354.99 364.7240 366.0476 -1.3236
2019-05-16 356.37 359.31 362.7490 365.8632 -3.1142
2019-06-17 342.69 350.62 350.9750 350.9524 0.0226
2019-06-18 355.57 357.12 351.3470 351.4268 -0.0798
2019-06-19 361.72 363.52 352.1260 352.1432 -0.0172
2019-06-20 365.91 365.21 352.9340 352.5520 0.3820
2019-06-21 365.00 369.21 353.7680 352.9480 0.8200
2019-07-19 323.40 315.10 362.5180 364.5508 -2.0328
2019-07-22 312.00 310.62 355.9640 363.3864 -7.4224
2019-10-16 283.12 286.28 277.3120 276.5924 0.7196
2019-10-17 304.49 293.35 279.8320 276.7720 3.0600
2019-12-13 298.50 298.50 302.2170 302.3528 -0.1358
2019-12-16 300.85 304.21 301.6390 302.8584 -1.2194
2019-12-19 324.50 332.22 307.1550 306.8264 0.3286
2019-12-20 335.00 336.90 310.1100 308.7176 1.3924
2020-03-06 367.70 368.97 372.4130 373.0492 -0.6362
2020-03-09 343.86 346.49 370.1920 373.1052 -2.9132
2020-04-01 376.05 364.08 355.5490 352.7094 2.8396
2020-04-02 364.08 370.08 359.3540 352.6442 6.7098
2020-06-02 425.87 427.31 428.5340 430.1872 -1.6532
2020-06-03 426.95 421.97 425.6270 430.9128 -5.2858
2020-06-19 449.12 453.72 434.4640 431.7060 2.7580
2020-06-22 455.01 468.04 439.3190 432.2600 7.0590
trade_signal signal_change entry_exit
date
2019-01-08 1.0 1.0 0.0
2019-01-09 1.0 0.0 1.0
2019-03-12 0.0 -1.0 0.0
2019-03-13 0.0 0.0 -1.0
2019-03-20 1.0 1.0 0.0
2019-03-21 1.0 0.0 1.0
2019-04-16 0.0 -1.0 0.0
2019-04-17 0.0 0.0 -1.0
2019-04-25 1.0 1.0 0.0
2019-04-26 1.0 0.0 1.0
2019-05-15 0.0 -1.0 0.0
2019-05-16 0.0 0.0 -1.0
2019-06-17 1.0 1.0 0.0
2019-06-18 0.0 -1.0 1.0
2019-06-19 0.0 0.0 -1.0
2019-06-20 1.0 1.0 0.0
2019-06-21 1.0 0.0 1.0
2019-07-19 0.0 -1.0 0.0
2019-07-22 0.0 0.0 -1.0
2019-10-16 1.0 1.0 0.0
2019-10-17 1.0 0.0 1.0
2019-12-13 0.0 -1.0 0.0
2019-12-16 0.0 0.0 -1.0
2019-12-19 1.0 1.0 0.0
2019-12-20 1.0 0.0 1.0
2020-03-06 0.0 -1.0 0.0
2020-03-09 0.0 0.0 -1.0
2020-04-01 1.0 1.0 0.0
2020-04-02 1.0 0.0 1.0
2020-06-02 0.0 -1.0 0.0
2020-06-03 0.0 0.0 -1.0
2020-06-19 1.0 1.0 0.0
2020-06-22 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_009_SlowMA_25_FastMA_15
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-09 317.710 319.96 273.569000 273.3098 0.259200
2019-01-10 314.570 324.66 277.150333 274.6842 2.466133
2019-03-19 366.400 358.78 357.618667 358.5064 -0.887733
2019-03-20 358.910 375.22 358.442000 359.1164 -0.674400
2019-03-25 359.000 366.23 361.018667 360.6124 0.406267
2019-03-26 367.870 359.97 361.396667 360.5344 0.862267
2019-04-12 360.690 351.14 362.491333 362.8124 -0.321067
2019-04-15 350.710 348.87 361.334000 362.4128 -1.078800
2019-04-22 359.700 377.34 363.159333 362.9780 0.181333
2019-04-23 375.450 381.89 364.154667 363.7160 0.438667
2019-05-20 351.230 348.11 363.897333 365.2140 -1.316667
2019-05-21 350.950 354.27 362.812667 365.4300 -2.617333
2019-06-21 365.000 369.21 353.429333 352.9480 0.481333
2019-06-24 370.270 371.04 355.723333 353.6116 2.111733
2019-07-22 312.000 310.62 363.206667 363.3864 -0.179733
2019-07-23 311.440 307.30 358.720000 361.6536 -2.933600
2019-10-18 289.360 275.30 276.466667 276.0180 0.448667
2019-10-21 272.890 278.05 277.162000 275.3684 1.793600
2020-03-10 356.425 364.13 372.467333 373.3504 -0.883067
2020-03-11 358.920 349.92 370.049333 372.5868 -2.537467
2020-04-06 365.220 379.96 353.500667 352.3098 1.190867
2020-04-07 380.000 372.28 357.002667 352.4502 4.552467
2020-06-05 407.290 419.60 429.867333 431.0004 -1.133067
2020-06-08 416.000 419.49 427.554000 431.1692 -3.615200
2020-06-22 455.010 468.04 433.059333 432.2600 0.799333
2020-06-23 466.500 466.26 435.656000 432.8072 2.848800
trade_signal signal_change entry_exit
date
2019-01-09 1.0 1.0 0.0
2019-01-10 1.0 0.0 1.0
2019-03-19 0.0 -1.0 0.0
2019-03-20 0.0 0.0 -1.0
2019-03-25 1.0 1.0 0.0
2019-03-26 1.0 0.0 1.0
2019-04-12 0.0 -1.0 0.0
2019-04-15 0.0 0.0 -1.0
2019-04-22 1.0 1.0 0.0
2019-04-23 1.0 0.0 1.0
2019-05-20 0.0 -1.0 0.0
2019-05-21 0.0 0.0 -1.0
2019-06-21 1.0 1.0 0.0
2019-06-24 1.0 0.0 1.0
2019-07-22 0.0 -1.0 0.0
2019-07-23 0.0 0.0 -1.0
2019-10-18 1.0 1.0 0.0
2019-10-21 1.0 0.0 1.0
2020-03-10 0.0 -1.0 0.0
2020-03-11 0.0 0.0 -1.0
2020-04-06 1.0 1.0 0.0
2020-04-07 1.0 0.0 1.0
2020-06-05 0.0 -1.0 0.0
2020-06-08 0.0 0.0 -1.0
2020-06-22 1.0 1.0 0.0
2020-06-23 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_010_SlowMA_25_FastMA_20
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-10 314.570 324.660 275.43675 274.6842 0.75255
2019-01-11 330.960 337.590 278.57225 277.1746 1.39765
2019-02-15 358.470 356.870 343.02850 343.6128 -0.58430
2019-02-19 355.800 361.920 344.16950 344.5860 -0.41650
2019-02-20 364.850 359.910 345.90700 345.6648 0.24220
2019-02-21 360.030 356.970 347.65600 345.7580 1.89800
2019-03-25 359.000 366.230 360.47900 360.6124 -0.13340
2019-03-26 367.870 359.970 360.22900 360.5344 -0.30540
2019-04-01 359.000 366.960 360.33750 360.0420 0.29550
2019-04-02 366.250 367.720 361.00850 360.1520 0.85650
2019-04-17 365.050 354.740 361.96600 362.2816 -0.31560
2019-04-18 355.000 360.350 361.09000 362.3428 -1.25280
2019-04-25 374.490 368.330 364.15050 364.0584 0.09210
2019-04-26 368.350 374.850 365.16250 363.9376 1.22490
2019-05-21 350.950 354.270 365.09850 365.4300 -0.33150
2019-05-22 358.010 359.730 364.37350 365.4408 -1.06730
2019-06-26 361.600 362.200 354.50550 354.4164 0.08910
2019-06-27 363.200 370.020 355.41400 354.8280 0.58600
2019-07-23 311.440 307.300 360.76200 361.6536 -0.89160
2019-07-24 310.510 317.940 358.64400 360.0864 -1.44240
2019-10-22 271.159 266.690 274.14400 274.0920 0.05200
2019-10-23 268.060 271.270 274.47000 273.2804 1.18960
2019-11-14 283.250 289.620 283.89550 284.4100 -0.51450
2019-11-15 290.590 295.030 284.88200 284.8940 -0.01200
2019-11-18 296.000 302.570 286.10800 285.5756 0.53240
2019-11-19 304.010 302.600 287.90350 286.3096 1.59390
2020-03-12 326.500 315.250 370.08800 370.4100 -0.32200
2020-03-13 330.510 336.295 367.83275 369.1838 -1.35105
2020-04-09 371.060 370.720 352.58825 351.8610 0.72725
2020-04-13 371.310 396.720 355.60950 352.9710 2.63850
2020-05-19 453.397 451.040 430.74350 431.0028 -0.25930
2020-05-20 454.250 447.670 432.05600 431.8396 0.21640
2020-05-21 448.560 436.250 432.53350 431.7228 0.81070
2020-06-08 416.000 419.490 431.00300 431.1692 -0.16620
2020-06-09 421.650 434.050 430.67950 431.4052 -0.72570
2020-06-24 468.540 457.850 433.95450 433.0796 0.87490
2020-06-25 458.860 465.910 436.57800 433.8092 2.76880
trade_signal signal_change entry_exit
date
2019-01-10 1.0 1.0 0.0
2019-01-11 1.0 0.0 1.0
2019-02-15 0.0 -1.0 0.0
2019-02-19 0.0 0.0 -1.0
2019-02-20 1.0 1.0 0.0
2019-02-21 1.0 0.0 1.0
2019-03-25 0.0 -1.0 0.0
2019-03-26 0.0 0.0 -1.0
2019-04-01 1.0 1.0 0.0
2019-04-02 1.0 0.0 1.0
2019-04-17 0.0 -1.0 0.0
2019-04-18 0.0 0.0 -1.0
2019-04-25 1.0 1.0 0.0
2019-04-26 1.0 0.0 1.0
2019-05-21 0.0 -1.0 0.0
2019-05-22 0.0 0.0 -1.0
2019-06-26 1.0 1.0 0.0
2019-06-27 1.0 0.0 1.0
2019-07-23 0.0 -1.0 0.0
2019-07-24 0.0 0.0 -1.0
2019-10-22 1.0 1.0 0.0
2019-10-23 1.0 0.0 1.0
2019-11-14 0.0 -1.0 0.0
2019-11-15 0.0 0.0 -1.0
2019-11-18 1.0 1.0 0.0
2019-11-19 1.0 0.0 1.0
2020-03-12 0.0 -1.0 0.0
2020-03-13 0.0 0.0 -1.0
2020-04-09 1.0 1.0 0.0
2020-04-13 1.0 0.0 1.0
2020-05-19 0.0 -1.0 0.0
2020-05-20 1.0 1.0 -1.0
2020-05-21 1.0 0.0 1.0
2020-06-08 0.0 -1.0 0.0
2020-06-09 0.0 0.0 -1.0
2020-06-24 1.0 1.0 0.0
2020-06-25 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_011_SlowMA_30_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-04 281.880 297.57 272.034 268.356500 3.677500
2019-01-07 302.100 315.34 283.886 269.968500 13.917500
2019-03-28 354.485 354.61 359.038 359.973333 -0.935333
2019-03-29 357.160 356.56 358.148 359.889667 -1.741667
2019-04-03 369.260 369.75 363.120 360.747333 2.372667
2019-04-04 370.070 367.88 365.774 361.111000 4.663000
2019-04-15 350.710 348.87 359.258 361.176333 -1.918333
2019-04-16 355.000 359.46 358.208 361.348333 -3.140333
2019-04-23 375.450 381.89 366.756 363.136667 3.619333
2019-04-24 381.070 374.23 369.710 363.735333 5.974667
2019-05-10 361.620 361.04 367.458 367.527000 -0.069000
2019-05-13 352.290 345.26 360.776 367.150333 -6.374333
2019-06-20 365.910 365.21 355.240 352.781667 2.458333
2019-06-21 365.000 369.21 361.136 352.997000 8.139000
2019-07-18 323.760 325.21 358.698 363.631333 -4.933333
2019-07-19 323.400 315.10 347.068 362.230333 -15.162333
2019-10-15 283.820 284.25 280.144 279.135667 1.008333
2019-10-16 283.120 286.28 283.894 278.961000 4.933000
2019-10-24 271.810 271.50 272.562 276.070333 -3.508333
2019-10-25 270.680 276.82 272.866 275.492667 -2.626667
2019-10-29 281.870 281.21 276.532 274.498667 2.033333
2019-10-30 284.340 291.45 280.568 274.495000 6.073000
2019-12-13 298.500 298.50 298.298 300.156000 -1.858000
2019-12-16 300.850 304.21 298.640 300.736000 -2.096000
2019-12-17 307.360 315.48 303.112 301.490000 1.622000
2019-12-18 316.260 320.80 307.486 302.582333 4.903667
2020-03-09 343.860 346.49 368.160 368.500667 -0.340667
2020-03-10 356.425 364.13 367.232 369.209000 -1.977000
2020-03-30 363.000 370.96 358.156 357.540833 0.615167
2020-03-31 367.930 375.50 361.792 357.131500 4.660500
2020-05-27 410.380 419.89 429.580 430.765667 -1.185667
2020-05-28 417.240 413.44 422.734 430.322000 -7.588000
2020-06-18 448.730 449.87 435.468 432.119000 3.349000
2020-06-19 449.120 453.72 442.598 432.692000 9.906000
trade_signal signal_change entry_exit
date
2019-01-04 1.0 1.0 0.0
2019-01-07 1.0 0.0 1.0
2019-03-28 0.0 -1.0 0.0
2019-03-29 0.0 0.0 -1.0
2019-04-03 1.0 1.0 0.0
2019-04-04 1.0 0.0 1.0
2019-04-15 0.0 -1.0 0.0
2019-04-16 0.0 0.0 -1.0
2019-04-23 1.0 1.0 0.0
2019-04-24 1.0 0.0 1.0
2019-05-10 0.0 -1.0 0.0
2019-05-13 0.0 0.0 -1.0
2019-06-20 1.0 1.0 0.0
2019-06-21 1.0 0.0 1.0
2019-07-18 0.0 -1.0 0.0
2019-07-19 0.0 0.0 -1.0
2019-10-15 1.0 1.0 0.0
2019-10-16 1.0 0.0 1.0
2019-10-24 0.0 -1.0 0.0
2019-10-25 0.0 0.0 -1.0
2019-10-29 1.0 1.0 0.0
2019-10-30 1.0 0.0 1.0
2019-12-13 0.0 -1.0 0.0
2019-12-16 0.0 0.0 -1.0
2019-12-17 1.0 1.0 0.0
2019-12-18 1.0 0.0 1.0
2020-03-09 0.0 -1.0 0.0
2020-03-10 0.0 0.0 -1.0
2020-03-30 1.0 1.0 0.0
2020-03-31 1.0 0.0 1.0
2020-05-27 0.0 -1.0 0.0
2020-05-28 0.0 0.0 -1.0
2020-06-18 1.0 1.0 0.0
2020-06-19 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_012_SlowMA_30_FastMA_10
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-08 319.98 320.27 273.8895 271.906500 1.983000
2019-01-09 317.71 319.96 282.4975 273.944500 8.553000
2019-04-17 365.05 354.74 360.5270 361.186000 -0.659000
2019-04-18 355.00 360.35 359.7740 361.444333 -1.670333
2019-04-24 381.07 374.23 363.9590 363.735333 0.223667
2019-04-25 374.49 368.33 364.4000 363.972667 0.427333
2019-05-15 343.34 354.99 364.7240 366.014333 -1.290333
2019-05-16 356.37 359.31 362.7490 365.666333 -2.917333
2019-06-20 365.91 365.21 352.9340 352.781667 0.152333
2019-06-21 365.00 369.21 353.7680 352.997000 0.771000
2019-07-22 312.00 310.62 355.9640 360.555333 -4.591333
2019-07-23 311.44 307.30 348.7010 359.065000 -10.364000
2019-10-17 304.49 293.35 279.8320 278.964333 0.867667
2019-10-18 289.36 275.30 280.0830 278.468667 1.614333
2020-03-11 358.92 349.92 367.6640 369.255667 -1.591667
2020-03-12 326.50 315.25 362.0180 368.325333 -6.307333
2020-04-02 364.08 370.08 359.3540 355.863833 3.490167
2020-04-03 367.36 361.76 362.2470 355.253500 6.993500
2020-06-02 425.87 427.31 428.5340 429.433333 -0.899333
2020-06-03 426.95 421.97 425.6270 429.038000 -3.411000
2020-06-19 449.12 453.72 434.4640 432.692000 1.772000
2020-06-22 455.01 468.04 439.3190 433.775000 5.544000
trade_signal signal_change entry_exit
date
2019-01-08 1.0 1.0 0.0
2019-01-09 1.0 0.0 1.0
2019-04-17 0.0 -1.0 0.0
2019-04-18 0.0 0.0 -1.0
2019-04-24 1.0 1.0 0.0
2019-04-25 1.0 0.0 1.0
2019-05-15 0.0 -1.0 0.0
2019-05-16 0.0 0.0 -1.0
2019-06-20 1.0 1.0 0.0
2019-06-21 1.0 0.0 1.0
2019-07-22 0.0 -1.0 0.0
2019-07-23 0.0 0.0 -1.0
2019-10-17 1.0 1.0 0.0
2019-10-18 1.0 0.0 1.0
2020-03-11 0.0 -1.0 0.0
2020-03-12 0.0 0.0 -1.0
2020-04-02 1.0 1.0 0.0
2020-04-03 1.0 0.0 1.0
2020-06-02 0.0 -1.0 0.0
2020-06-03 0.0 0.0 -1.0
2020-06-19 1.0 1.0 0.0
2020-06-22 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_013_SlowMA_30_FastMA_15
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-10 314.57 324.660 277.150333 276.052167 1.098167
2019-01-11 330.96 337.590 281.871667 278.417500 3.454167
2019-04-16 355.00 359.460 361.300000 361.348333 -0.048333
2019-04-17 365.05 354.740 361.391333 361.186000 0.205333
2019-04-18 355.00 360.350 361.774000 361.444333 0.329667
2019-05-20 351.23 348.110 363.897333 364.639333 -0.742000
2019-05-21 350.95 354.270 362.812667 364.401333 -1.588667
2019-06-21 365.00 369.210 353.429333 352.997000 0.432333
2019-06-24 370.27 371.040 355.723333 353.330333 2.393000
2019-07-23 311.44 307.300 358.720000 359.065000 -0.345000
2019-07-24 310.51 317.940 354.887333 357.954000 -3.066667
2019-10-23 268.06 271.270 277.185333 276.649000 0.536333
2019-10-24 271.81 271.500 277.408667 276.070333 1.338333
2020-03-12 326.50 315.250 365.332667 368.325333 -2.992667
2020-03-13 330.51 336.295 362.414333 367.943833 -5.529500
2020-04-07 380.00 372.280 357.002667 356.035167 0.967500
2020-04-08 374.01 371.120 360.712667 355.764500 4.948167
2020-06-08 416.00 419.490 427.554000 428.381667 -0.827667
2020-06-09 421.65 434.050 426.318667 428.804000 -2.485333
2020-06-23 466.50 466.260 435.656000 434.633000 1.023000
2020-06-24 468.54 457.850 438.048000 435.500667 2.547333
trade_signal signal_change entry_exit
date
2019-01-10 1.0 1.0 0.0
2019-01-11 1.0 0.0 1.0
2019-04-16 0.0 -1.0 0.0
2019-04-17 1.0 1.0 -1.0
2019-04-18 1.0 0.0 1.0
2019-05-20 0.0 -1.0 0.0
2019-05-21 0.0 0.0 -1.0
2019-06-21 1.0 1.0 0.0
2019-06-24 1.0 0.0 1.0
2019-07-23 0.0 -1.0 0.0
2019-07-24 0.0 0.0 -1.0
2019-10-23 1.0 1.0 0.0
2019-10-24 1.0 0.0 1.0
2020-03-12 0.0 -1.0 0.0
2020-03-13 0.0 0.0 -1.0
2020-04-07 1.0 1.0 0.0
2020-04-08 1.0 0.0 1.0
2020-06-08 0.0 -1.0 0.0
2020-06-09 0.0 0.0 -1.0
2020-06-23 1.0 1.0 0.0
2020-06-24 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_014_SlowMA_30_FastMA_20
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-11 330.960 337.590 278.57225 278.417500 0.154750
2019-01-14 334.240 332.940 281.41825 280.093833 1.324417
2019-03-27 361.000 353.370 359.75400 359.878667 -0.124667
2019-03-28 354.485 354.610 359.57950 359.973333 -0.393833
2019-04-01 359.000 366.960 360.33750 360.226000 0.111500
2019-04-02 366.250 367.720 361.00850 360.419333 0.589167
2019-04-18 355.000 360.350 361.09000 361.444333 -0.354333
2019-04-22 359.700 377.340 361.90650 362.369000 -0.462500
2019-04-25 374.490 368.330 364.15050 363.972667 0.177833
2019-04-26 368.350 374.850 365.16250 364.507000 0.655500
2019-05-23 355.500 352.210 363.56750 363.845000 -0.277500
2019-05-24 355.410 354.390 362.54450 363.403000 -0.858500
2019-06-24 370.270 371.040 353.57900 353.330333 0.248667
2019-06-25 370.750 360.300 353.85500 353.831667 0.023333
2019-07-25 318.860 326.460 356.85700 357.317333 -0.460333
2019-07-26 328.790 335.780 355.14500 357.062333 -1.917333
2019-10-25 270.680 276.820 275.56650 275.492667 0.073833
2019-10-28 278.050 281.860 276.27850 275.078333 1.200167
2020-03-13 330.510 336.295 367.83275 367.943833 -0.111083
2020-03-16 306.630 298.840 363.75475 366.402167 -2.647417
2020-04-14 397.500 413.550 361.34500 357.737833 3.607167
2020-04-15 413.000 426.750 366.69500 359.670500 7.024500
2020-06-11 428.200 425.560 430.17700 430.281333 -0.104333
2020-06-12 429.000 418.070 428.98300 430.222000 -1.239000
2020-06-25 458.860 465.910 436.57800 436.422000 0.156000
2020-06-26 466.390 443.400 437.76150 436.470333 1.291167
trade_signal signal_change entry_exit
date
2019-01-11 1.0 1.0 0.0
2019-01-14 1.0 0.0 1.0
2019-03-27 0.0 -1.0 0.0
2019-03-28 0.0 0.0 -1.0
2019-04-01 1.0 1.0 0.0
2019-04-02 1.0 0.0 1.0
2019-04-18 0.0 -1.0 0.0
2019-04-22 0.0 0.0 -1.0
2019-04-25 1.0 1.0 0.0
2019-04-26 1.0 0.0 1.0
2019-05-23 0.0 -1.0 0.0
2019-05-24 0.0 0.0 -1.0
2019-06-24 1.0 1.0 0.0
2019-06-25 1.0 0.0 1.0
2019-07-25 0.0 -1.0 0.0
2019-07-26 0.0 0.0 -1.0
2019-10-25 1.0 1.0 0.0
2019-10-28 1.0 0.0 1.0
2020-03-13 0.0 -1.0 0.0
2020-03-16 0.0 0.0 -1.0
2020-04-14 1.0 1.0 0.0
2020-04-15 1.0 0.0 1.0
2020-06-11 0.0 -1.0 0.0
2020-06-12 0.0 0.0 -1.0
2020-06-25 1.0 1.0 0.0
2020-06-26 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_015_SlowMA_35_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-04 281.88 297.57 272.034 270.819857 1.214143
2019-01-07 302.10 315.34 283.886 271.418143 12.467857
2019-03-29 357.16 356.56 358.148 358.880000 -0.732000
2019-04-01 359.00 366.96 358.294 359.434000 -1.140000
2019-04-03 369.26 369.75 363.120 360.341714 2.778286
2019-04-04 370.07 367.88 365.774 360.802000 4.972000
2019-04-15 350.71 348.87 359.258 360.845429 -1.587429
2019-04-16 355.00 359.46 358.208 360.688000 -2.480000
2019-04-23 375.45 381.89 366.756 361.973429 4.782571
2019-04-24 381.07 374.23 369.710 362.542857 7.167143
2019-05-13 352.29 345.26 360.776 365.864286 -5.088286
2019-05-14 348.71 345.61 355.806 365.275143 -9.469143
2019-06-21 365.00 369.21 361.136 355.748286 5.387714
2019-06-24 370.27 371.04 365.220 355.348571 9.871429
2019-07-18 323.76 325.21 358.698 361.423714 -2.725714
2019-07-19 323.40 315.10 347.068 360.373714 -13.305714
2019-10-16 283.12 286.28 283.894 280.912571 2.981429
2019-10-17 304.49 293.35 286.468 280.957714 5.510286
2019-10-23 268.06 271.27 276.932 278.671143 -1.739143
2019-10-24 271.81 271.50 272.562 278.049714 -5.487714
2019-10-30 284.34 291.45 280.568 277.208857 3.359143
2019-10-31 291.00 287.41 283.750 277.167429 6.582571
2020-03-11 358.92 349.92 360.458 365.652286 -5.194286
2020-03-12 326.50 315.25 348.952 365.345143 -16.393143
2020-03-31 367.93 375.50 361.792 360.492143 1.299857
2020-04-01 376.05 364.08 366.130 360.217571 5.912429
2020-05-28 417.24 413.44 422.734 425.386286 -2.652286
2020-05-29 417.46 419.73 419.430 426.775143 -7.345143
2020-06-17 441.82 447.77 430.606 429.937143 0.668857
2020-06-18 448.73 449.87 435.468 431.022286 4.445714
trade_signal signal_change entry_exit
date
2019-01-04 1.0 1.0 0.0
2019-01-07 1.0 0.0 1.0
2019-03-29 0.0 -1.0 0.0
2019-04-01 0.0 0.0 -1.0
2019-04-03 1.0 1.0 0.0
2019-04-04 1.0 0.0 1.0
2019-04-15 0.0 -1.0 0.0
2019-04-16 0.0 0.0 -1.0
2019-04-23 1.0 1.0 0.0
2019-04-24 1.0 0.0 1.0
2019-05-13 0.0 -1.0 0.0
2019-05-14 0.0 0.0 -1.0
2019-06-21 1.0 1.0 0.0
2019-06-24 1.0 0.0 1.0
2019-07-18 0.0 -1.0 0.0
2019-07-19 0.0 0.0 -1.0
2019-10-16 1.0 1.0 0.0
2019-10-17 1.0 0.0 1.0
2019-10-23 0.0 -1.0 0.0
2019-10-24 0.0 0.0 -1.0
2019-10-30 1.0 1.0 0.0
2019-10-31 1.0 0.0 1.0
2020-03-11 0.0 -1.0 0.0
2020-03-12 0.0 0.0 -1.0
2020-03-31 1.0 1.0 0.0
2020-04-01 1.0 0.0 1.0
2020-05-28 0.0 -1.0 0.0
2020-05-29 0.0 0.0 -1.0
2020-06-17 1.0 1.0 0.0
2020-06-18 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_016_SlowMA_35_FastMA_10
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-08 319.980 320.270 273.8895 272.376429 1.513071
2019-01-09 317.710 319.960 282.4975 273.230714 9.266786
2019-04-18 355.000 360.350 359.7740 360.520000 -0.746000
2019-04-22 359.700 377.340 360.9590 361.092000 -0.133000
2019-04-23 375.450 381.890 363.0070 361.973429 1.033571
2019-04-24 381.070 374.230 363.9590 362.542857 1.416143
2019-05-15 343.340 354.990 364.7240 365.132857 -0.408857
2019-05-16 356.370 359.310 362.7490 365.302571 -2.553571
2019-06-24 370.270 371.040 355.6710 355.348571 0.322429
2019-06-25 370.750 360.300 356.5740 354.823714 1.750286
2019-07-22 312.000 310.620 355.9640 359.440571 -3.476571
2019-07-23 311.440 307.300 348.7010 358.602571 -9.901571
2019-10-21 272.890 278.050 280.4420 279.895429 0.546571
2019-10-22 271.159 266.690 280.0390 279.249714 0.789286
2020-03-12 326.500 315.250 362.0180 365.345143 -3.327143
2020-03-13 330.510 336.295 358.7445 364.965000 -6.220500
2020-04-03 367.360 361.760 362.2470 359.372714 2.874286
2020-04-06 365.220 379.960 364.2160 359.360143 4.855857
2020-06-02 425.870 427.310 428.5340 429.226286 -0.692286
2020-06-03 426.950 421.970 425.6270 429.466857 -3.839857
2020-06-18 448.730 449.870 431.0520 431.022286 0.029714
2020-06-19 449.120 453.720 434.4640 431.990000 2.474000
trade_signal signal_change entry_exit
date
2019-01-08 1.0 1.0 0.0
2019-01-09 1.0 0.0 1.0
2019-04-18 0.0 -1.0 0.0
2019-04-22 0.0 0.0 -1.0
2019-04-23 1.0 1.0 0.0
2019-04-24 1.0 0.0 1.0
2019-05-15 0.0 -1.0 0.0
2019-05-16 0.0 0.0 -1.0
2019-06-24 1.0 1.0 0.0
2019-06-25 1.0 0.0 1.0
2019-07-22 0.0 -1.0 0.0
2019-07-23 0.0 0.0 -1.0
2019-10-21 1.0 1.0 0.0
2019-10-22 1.0 0.0 1.0
2020-03-12 0.0 -1.0 0.0
2020-03-13 0.0 0.0 -1.0
2020-04-03 1.0 1.0 0.0
2020-04-06 1.0 0.0 1.0
2020-06-02 0.0 -1.0 0.0
2020-06-03 0.0 0.0 -1.0
2020-06-18 1.0 1.0 0.0
2020-06-19 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_017_SlowMA_35_FastMA_15
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-09 317.71 319.960 273.569000 273.230714 0.338286
2019-01-10 314.57 324.660 277.150333 274.329286 2.821048
2019-05-20 351.23 348.110 363.897333 365.056571 -1.159238
2019-05-21 350.95 354.270 362.812667 364.694000 -1.881333
2019-06-24 370.27 371.040 355.723333 355.348571 0.374762
2019-06-25 370.75 360.300 356.183333 354.823714 1.359619
2019-07-24 310.51 317.940 354.887333 357.589429 -2.702095
2019-07-25 318.86 326.460 351.203333 356.753143 -5.549810
2019-10-25 270.68 276.820 277.677333 277.668286 0.009048
2019-10-28 278.05 281.860 278.170667 277.311714 0.858952
2020-03-12 326.50 315.250 365.332667 365.345143 -0.012476
2020-03-13 330.51 336.295 362.414333 364.965000 -2.550667
2020-04-08 374.01 371.120 360.712667 358.486714 2.225952
2020-04-09 371.06 370.720 363.292000 358.050143 5.241857
2020-06-08 416.00 419.490 427.554000 428.453714 -0.899714
2020-06-09 421.65 434.050 426.318667 428.355429 -2.036762
2020-06-23 466.50 466.260 435.656000 434.586571 1.069429
2020-06-24 468.54 457.850 438.048000 435.534286 2.513714
trade_signal signal_change entry_exit
date
2019-01-09 1.0 1.0 0.0
2019-01-10 1.0 0.0 1.0
2019-05-20 0.0 -1.0 0.0
2019-05-21 0.0 0.0 -1.0
2019-06-24 1.0 1.0 0.0
2019-06-25 1.0 0.0 1.0
2019-07-24 0.0 -1.0 0.0
2019-07-25 0.0 0.0 -1.0
2019-10-25 1.0 1.0 0.0
2019-10-28 1.0 0.0 1.0
2020-03-12 0.0 -1.0 0.0
2020-03-13 0.0 0.0 -1.0
2020-04-08 1.0 1.0 0.0
2020-04-09 1.0 0.0 1.0
2020-06-08 0.0 -1.0 0.0
2020-06-09 0.0 0.0 -1.0
2020-06-23 1.0 1.0 0.0
2020-06-24 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_018_SlowMA_35_FastMA_20
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-10 314.570 324.66 275.43675 274.329286 1.107464
2019-01-11 330.960 337.59 278.57225 276.243286 2.328964
2019-05-22 358.010 359.73 364.37350 364.465714 -0.092214
2019-05-23 355.500 352.21 363.56750 363.964571 -0.397071
2019-06-27 363.200 370.02 355.41400 354.749143 0.664857
2019-06-28 370.260 367.32 356.61600 354.879714 1.736286
2019-07-26 328.790 335.78 355.14500 356.143143 -0.998143
2019-07-29 335.980 332.70 353.41400 355.338286 -1.924286
2019-10-30 284.340 291.45 278.03100 277.208857 0.822143
2019-10-31 291.000 287.41 278.99400 277.167429 1.826571
2020-03-17 306.180 319.75 360.35325 362.752143 -2.398893
2020-03-18 302.395 315.47 356.81725 361.807857 -4.990607
2020-04-14 397.500 413.55 361.34500 359.807286 1.537714
2020-04-15 413.000 426.75 366.69500 361.711857 4.983143
2020-06-15 421.400 425.50 427.54850 428.260286 -0.711786
2020-06-16 425.760 436.13 426.72600 428.681714 -1.955714
2020-06-25 458.860 465.91 436.57800 436.438571 0.139429
2020-06-26 466.390 443.40 437.76150 436.634857 1.126643
trade_signal signal_change entry_exit
date
2019-01-10 1.0 1.0 0.0
2019-01-11 1.0 0.0 1.0
2019-05-22 0.0 -1.0 0.0
2019-05-23 0.0 0.0 -1.0
2019-06-27 1.0 1.0 0.0
2019-06-28 1.0 0.0 1.0
2019-07-26 0.0 -1.0 0.0
2019-07-29 0.0 0.0 -1.0
2019-10-30 1.0 1.0 0.0
2019-10-31 1.0 0.0 1.0
2020-03-17 0.0 -1.0 0.0
2020-03-18 0.0 0.0 -1.0
2020-04-14 1.0 1.0 0.0
2020-04-15 1.0 0.0 1.0
2020-06-15 0.0 -1.0 0.0
2020-06-16 0.0 0.0 -1.0
2020-06-25 1.0 1.0 0.0
2020-06-26 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_019_SlowMA_40_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-07 302.100 315.34 283.886 275.924875 7.961125
2019-01-08 319.980 320.27 294.408 275.744125 18.663875
2019-04-01 359.000 366.96 358.294 358.295250 -0.001250
2019-04-02 366.250 367.72 359.844 358.704750 1.139250
2019-04-03 369.260 369.75 363.120 359.053250 4.066750
2019-04-15 350.710 348.87 359.258 360.883000 -1.625000
2019-04-16 355.000 359.46 358.208 360.821500 -2.613500
2019-04-23 375.450 381.89 366.756 361.584250 5.171750
2019-04-24 381.070 374.23 369.710 361.815750 7.894250
2019-05-13 352.290 345.26 360.776 366.039250 -5.263250
2019-05-14 348.710 345.61 355.806 365.593500 -9.787500
2019-06-21 365.000 369.21 361.136 358.157000 2.979000
2019-06-24 370.270 371.04 365.220 358.061750 7.158250
2019-07-18 323.760 325.21 358.698 360.503250 -1.805250
2019-07-19 323.400 315.10 347.068 359.387500 -12.319500
2019-10-16 283.120 286.28 283.894 282.603250 1.290750
2019-10-17 304.490 293.35 286.468 282.491750 3.976250
2019-10-22 271.159 266.69 279.934 280.909000 -0.975000
2019-10-23 268.060 271.27 276.932 280.415000 -3.483000
2019-10-30 284.340 291.45 280.568 278.908250 1.659750
2019-10-31 291.000 287.41 283.750 278.762250 4.987750
2020-03-11 358.920 349.92 360.458 362.299750 -1.841750
2020-03-12 326.500 315.25 348.952 361.713750 -12.761750
2020-03-31 367.930 375.50 361.792 361.517375 0.274625
2020-04-01 376.050 364.08 366.130 361.394125 4.735875
2020-05-29 417.460 419.73 419.430 419.808250 -0.378250
2020-06-01 418.830 425.92 418.750 421.204250 -2.454250
2020-06-17 441.820 447.77 430.606 428.653000 1.953000
2020-06-18 448.730 449.87 435.468 429.364250 6.103750
trade_signal signal_change entry_exit
date
2019-01-07 1.0 1.0 0.0
2019-01-08 1.0 0.0 1.0
2019-04-01 0.0 -1.0 0.0
2019-04-02 1.0 1.0 -1.0
2019-04-03 1.0 0.0 1.0
2019-04-15 0.0 -1.0 0.0
2019-04-16 0.0 0.0 -1.0
2019-04-23 1.0 1.0 0.0
2019-04-24 1.0 0.0 1.0
2019-05-13 0.0 -1.0 0.0
2019-05-14 0.0 0.0 -1.0
2019-06-21 1.0 1.0 0.0
2019-06-24 1.0 0.0 1.0
2019-07-18 0.0 -1.0 0.0
2019-07-19 0.0 0.0 -1.0
2019-10-16 1.0 1.0 0.0
2019-10-17 1.0 0.0 1.0
2019-10-22 0.0 -1.0 0.0
2019-10-23 0.0 0.0 -1.0
2019-10-30 1.0 1.0 0.0
2019-10-31 1.0 0.0 1.0
2020-03-11 0.0 -1.0 0.0
2020-03-12 0.0 0.0 -1.0
2020-03-31 1.0 1.0 0.0
2020-04-01 1.0 0.0 1.0
2020-05-29 0.0 -1.0 0.0
2020-06-01 0.0 0.0 -1.0
2020-06-17 1.0 1.0 0.0
2020-06-18 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_020_SlowMA_40_FastMA_10
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-09 317.71 319.960 282.4975 275.795125 6.702375
2019-01-10 314.57 324.660 289.5965 276.324875 13.271625
2019-04-17 365.05 354.740 360.5270 360.692250 -0.165250
2019-04-18 355.00 360.350 359.7740 360.776750 -1.002750
2019-04-23 375.45 381.890 363.0070 361.584250 1.422750
2019-04-24 381.07 374.230 363.9590 361.815750 2.143250
2019-05-15 343.34 354.990 364.7240 365.498750 -0.774750
2019-05-16 356.37 359.310 362.7490 365.101000 -2.352000
2019-06-26 361.60 362.200 358.2380 357.565000 0.673000
2019-06-27 363.20 370.020 360.8970 357.345250 3.551750
2019-07-22 312.00 310.620 355.9640 358.347750 -2.383750
2019-07-23 311.44 307.300 348.7010 357.170500 -8.469500
2019-11-01 288.70 286.810 279.3070 278.678250 0.628750
2019-11-04 288.00 292.860 280.7880 278.641250 2.146750
2020-03-13 330.51 336.295 358.7445 361.644375 -2.899875
2020-03-16 306.63 298.840 350.5235 360.649875 -10.126375
2020-04-03 367.36 361.760 362.2470 361.274625 0.972375
2020-04-06 365.22 379.960 364.2160 361.604375 2.611625
2020-06-04 422.39 414.330 422.2930 424.944500 -2.651500
2020-06-05 407.29 419.600 420.6280 426.156500 -5.528500
2020-06-18 448.73 449.870 431.0520 429.364250 1.687750
2020-06-19 449.12 453.720 434.4640 430.039750 4.424250
trade_signal signal_change entry_exit
date
2019-01-09 1.0 1.0 0.0
2019-01-10 1.0 0.0 1.0
2019-04-17 0.0 -1.0 0.0
2019-04-18 0.0 0.0 -1.0
2019-04-23 1.0 1.0 0.0
2019-04-24 1.0 0.0 1.0
2019-05-15 0.0 -1.0 0.0
2019-05-16 0.0 0.0 -1.0
2019-06-26 1.0 1.0 0.0
2019-06-27 1.0 0.0 1.0
2019-07-22 0.0 -1.0 0.0
2019-07-23 0.0 0.0 -1.0
2019-11-01 1.0 1.0 0.0
2019-11-04 1.0 0.0 1.0
2020-03-13 0.0 -1.0 0.0
2020-03-16 0.0 0.0 -1.0
2020-04-03 1.0 1.0 0.0
2020-04-06 1.0 0.0 1.0
2020-06-04 0.0 -1.0 0.0
2020-06-05 0.0 0.0 -1.0
2020-06-18 1.0 1.0 0.0
2020-06-19 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_021_SlowMA_40_FastMA_15
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-10 314.57 324.66 277.150333 276.324875 0.825458
2019-01-11 330.96 337.59 281.871667 277.412875 4.458792
2019-05-20 351.23 348.11 363.897333 364.193000 -0.295667
2019-05-21 350.95 354.27 362.812667 363.894000 -1.081333
2019-06-27 363.20 370.02 357.474000 357.345250 0.128750
2019-06-28 370.26 367.32 357.904000 357.051750 0.852250
2019-07-24 310.51 317.94 354.887333 356.249500 -1.362167
2019-07-25 318.86 326.46 351.203333 355.681250 -4.477917
2019-10-30 284.34 291.45 280.464667 278.908250 1.556417
2019-10-31 291.00 287.41 280.926667 278.762250 2.164417
2020-03-16 306.63 298.84 357.757000 360.649875 -2.892875
2020-03-17 306.18 319.75 355.067667 360.151875 -5.084208
2020-04-09 371.06 370.72 363.292000 361.338125 1.953875
2020-04-13 371.31 396.72 367.551333 361.721125 5.830208
2020-06-09 421.65 434.05 426.318667 428.309000 -1.990333
2020-06-10 436.00 434.48 425.214667 428.832250 -3.617583
2020-06-19 449.12 453.72 430.251333 430.039750 0.211583
2020-06-22 455.01 468.04 433.059333 431.116000 1.943333
trade_signal signal_change entry_exit
date
2019-01-10 1.0 1.0 0.0
2019-01-11 1.0 0.0 1.0
2019-05-20 0.0 -1.0 0.0
2019-05-21 0.0 0.0 -1.0
2019-06-27 1.0 1.0 0.0
2019-06-28 1.0 0.0 1.0
2019-07-24 0.0 -1.0 0.0
2019-07-25 0.0 0.0 -1.0
2019-10-30 1.0 1.0 0.0
2019-10-31 1.0 0.0 1.0
2020-03-16 0.0 -1.0 0.0
2020-03-17 0.0 0.0 -1.0
2020-04-09 1.0 1.0 0.0
2020-04-13 1.0 0.0 1.0
2020-06-09 0.0 -1.0 0.0
2020-06-10 0.0 0.0 -1.0
2020-06-19 1.0 1.0 0.0
2020-06-22 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_022_SlowMA_40_FastMA_20
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-11 330.960 337.59 278.57225 277.412875 1.159375
2019-01-14 334.240 332.94 281.41825 278.376375 3.041875
2019-05-23 355.500 352.21 363.56750 363.859000 -0.291500
2019-05-24 355.410 354.39 362.54450 363.853500 -1.309000
2019-07-01 373.500 374.60 358.51450 356.791000 1.723500
2019-07-02 374.890 375.43 359.61600 356.710000 2.906000
2019-07-26 328.790 335.78 355.14500 355.279500 -0.134500
2019-07-29 335.980 332.70 353.41400 355.015000 -1.601000
2019-10-31 291.000 287.41 278.99400 278.762250 0.231750
2019-11-01 288.700 286.81 279.69500 278.678250 1.016750
2020-03-18 302.395 315.47 356.81725 359.585875 -2.768625
2020-03-19 324.330 332.03 354.11875 359.736625 -5.617875
2020-04-15 413.000 426.75 366.69500 363.524125 3.170875
2020-04-16 437.000 439.17 372.88000 364.848625 8.031375
2020-06-15 421.400 425.50 427.54850 428.338500 -0.790000
2020-06-16 425.760 436.13 426.72600 428.304500 -1.578500
2020-06-24 468.540 457.85 433.95450 433.588500 0.366000
2020-06-25 458.860 465.91 436.57800 434.939000 1.639000
trade_signal signal_change entry_exit
date
2019-01-11 1.0 1.0 0.0
2019-01-14 1.0 0.0 1.0
2019-05-23 0.0 -1.0 0.0
2019-05-24 0.0 0.0 -1.0
2019-07-01 1.0 1.0 0.0
2019-07-02 1.0 0.0 1.0
2019-07-26 0.0 -1.0 0.0
2019-07-29 0.0 0.0 -1.0
2019-10-31 1.0 1.0 0.0
2019-11-01 1.0 0.0 1.0
2020-03-18 0.0 -1.0 0.0
2020-03-19 0.0 0.0 -1.0
2020-04-15 1.0 1.0 0.0
2020-04-16 1.0 0.0 1.0
2020-06-15 0.0 -1.0 0.0
2020-06-16 0.0 0.0 -1.0
2020-06-24 1.0 1.0 0.0
2020-06-25 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_023_SlowMA_45_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-07 302.100 315.340 283.886 279.811889 4.074111
2019-01-08 319.980 320.270 294.408 280.222778 14.185222
2019-04-15 350.710 348.870 359.258 360.194000 -0.936000
2019-04-16 355.000 359.460 358.208 360.499111 -2.291111
2019-04-23 375.450 381.890 366.756 361.535556 5.220444
2019-04-24 381.070 374.230 369.710 361.809111 7.900889
2019-05-13 352.290 345.260 360.776 365.293111 -4.517111
2019-05-14 348.710 345.610 355.806 364.998667 -9.192667
2019-06-21 365.000 369.210 361.136 359.742667 1.393333
2019-06-24 370.270 371.040 365.220 359.980222 5.239778
2019-07-18 323.760 325.210 358.698 359.805778 -1.107778
2019-07-19 323.400 315.100 347.068 358.919333 -11.851333
2019-10-17 304.490 293.350 286.468 284.542444 1.925556
2019-10-18 289.360 275.300 284.942 284.087778 0.854222
2019-10-21 272.890 278.050 283.446 283.537778 -0.091778
2019-10-22 271.159 266.690 279.934 282.589111 -2.655111
2019-10-30 284.340 291.450 280.568 280.432000 0.136000
2019-10-31 291.000 287.410 283.750 280.335111 3.414889
2020-03-12 326.500 315.250 348.952 358.891778 -9.939778
2020-03-13 330.510 336.295 342.417 358.825889 -16.408889
2020-03-31 367.930 375.500 361.792 360.071222 1.720778
2020-04-01 376.050 364.080 366.130 360.417000 5.713000
2020-06-08 416.000 419.490 420.540 421.130444 -0.590444
2020-06-09 421.650 434.050 421.888 422.736889 -0.848889
2020-06-10 436.000 434.480 424.390 423.948444 0.441556
2020-06-11 428.200 425.560 426.636 425.132444 1.503556
2020-06-16 425.760 436.130 427.948 428.268889 -0.320889
2020-06-17 441.820 447.770 430.606 429.029333 1.576667
2020-06-18 448.730 449.870 435.468 429.543111 5.924889
trade_signal signal_change entry_exit
date
2019-01-07 1.0 1.0 0.0
2019-01-08 1.0 0.0 1.0
2019-04-15 0.0 -1.0 0.0
2019-04-16 0.0 0.0 -1.0
2019-04-23 1.0 1.0 0.0
2019-04-24 1.0 0.0 1.0
2019-05-13 0.0 -1.0 0.0
2019-05-14 0.0 0.0 -1.0
2019-06-21 1.0 1.0 0.0
2019-06-24 1.0 0.0 1.0
2019-07-18 0.0 -1.0 0.0
2019-07-19 0.0 0.0 -1.0
2019-10-17 1.0 1.0 0.0
2019-10-18 1.0 0.0 1.0
2019-10-21 0.0 -1.0 0.0
2019-10-22 0.0 0.0 -1.0
2019-10-30 1.0 1.0 0.0
2019-10-31 1.0 0.0 1.0
2020-03-12 0.0 -1.0 0.0
2020-03-13 0.0 0.0 -1.0
2020-03-31 1.0 1.0 0.0
2020-04-01 1.0 0.0 1.0
2020-06-08 0.0 -1.0 0.0
2020-06-09 0.0 0.0 -1.0
2020-06-10 1.0 1.0 0.0
2020-06-11 1.0 0.0 1.0
2020-06-16 0.0 -1.0 0.0
2020-06-17 1.0 1.0 -1.0
2020-06-18 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_024_SlowMA_45_FastMA_10
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-09 317.71 319.960 282.4975 280.280111 2.217389
2019-01-10 314.57 324.660 289.5965 280.625889 8.970611
2019-04-18 355.00 360.350 359.7740 360.573556 -0.799556
2019-04-22 359.70 377.340 360.9590 360.979556 -0.020556
2019-04-23 375.45 381.890 363.0070 361.535556 1.471444
2019-04-24 381.07 374.230 363.9590 361.809111 2.149889
2019-05-15 343.34 354.990 364.7240 364.970222 -0.246222
2019-05-16 356.37 359.310 362.7490 364.928000 -2.179000
2019-06-27 363.20 370.020 360.8970 359.070444 1.826556
2019-06-28 370.26 367.320 363.6560 359.048000 4.608000
2019-07-22 312.00 310.620 355.9640 357.837333 -1.873333
2019-07-23 311.44 307.300 348.7010 356.789556 -8.088556
2019-11-04 288.00 292.860 280.7880 280.093778 0.694222
2019-11-05 289.99 288.030 282.9220 280.065778 2.856222
2020-03-13 330.51 336.295 358.7445 358.825889 -0.081389
2020-03-16 306.63 298.840 350.5235 358.007667 -7.484167
2020-04-03 367.36 361.760 362.2470 361.326778 0.920222
2020-04-06 365.22 379.960 364.2160 362.101667 2.114333
2020-06-08 416.00 419.490 419.6450 421.130444 -1.485444
2020-06-09 421.65 434.050 421.5730 422.736889 -1.163889
2020-06-18 448.73 449.870 431.0520 429.543111 1.508889
2020-06-19 449.12 453.720 434.4640 429.866444 4.597556
trade_signal signal_change entry_exit
date
2019-01-09 1.0 1.0 0.0
2019-01-10 1.0 0.0 1.0
2019-04-18 0.0 -1.0 0.0
2019-04-22 0.0 0.0 -1.0
2019-04-23 1.0 1.0 0.0
2019-04-24 1.0 0.0 1.0
2019-05-15 0.0 -1.0 0.0
2019-05-16 0.0 0.0 -1.0
2019-06-27 1.0 1.0 0.0
2019-06-28 1.0 0.0 1.0
2019-07-22 0.0 -1.0 0.0
2019-07-23 0.0 0.0 -1.0
2019-11-04 1.0 1.0 0.0
2019-11-05 1.0 0.0 1.0
2020-03-13 0.0 -1.0 0.0
2020-03-16 0.0 0.0 -1.0
2020-04-03 1.0 1.0 0.0
2020-04-06 1.0 0.0 1.0
2020-06-08 0.0 -1.0 0.0
2020-06-09 0.0 0.0 -1.0
2020-06-18 1.0 1.0 0.0
2020-06-19 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_025_SlowMA_45_FastMA_15
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-11 330.96 337.59 281.871667 281.118111 0.753556
2019-01-14 334.24 332.94 286.695667 281.609222 5.086444
2019-05-20 351.23 348.11 363.897333 364.534222 -0.636889
2019-05-21 350.95 354.27 362.812667 364.330444 -1.517778
2019-07-01 373.50 374.60 359.410000 359.042444 0.367556
2019-07-02 374.89 375.43 361.020667 359.122444 1.898222
2019-07-24 310.51 317.94 354.887333 356.119111 -1.231778
2019-07-25 318.86 326.46 351.203333 355.501111 -4.297778
2019-10-30 284.34 291.45 280.464667 280.432000 0.032667
2019-10-31 291.00 287.41 280.926667 280.335111 0.591556
2020-03-16 306.63 298.84 357.757000 358.007667 -0.250667
2020-03-17 306.18 319.75 355.067667 357.801000 -2.733333
2020-04-09 371.06 370.72 363.292000 362.489222 0.802778
2020-04-13 371.31 396.72 367.551333 363.150778 4.400556
2020-06-11 428.20 425.56 423.740667 425.132444 -1.391778
2020-06-12 429.00 418.07 422.528667 426.175778 -3.647111
2020-06-19 449.12 453.72 430.251333 429.866444 0.384889
2020-06-22 455.01 468.04 433.059333 430.868222 2.191111
trade_signal signal_change entry_exit
date
2019-01-11 1.0 1.0 0.0
2019-01-14 1.0 0.0 1.0
2019-05-20 0.0 -1.0 0.0
2019-05-21 0.0 0.0 -1.0
2019-07-01 1.0 1.0 0.0
2019-07-02 1.0 0.0 1.0
2019-07-24 0.0 -1.0 0.0
2019-07-25 0.0 0.0 -1.0
2019-10-30 1.0 1.0 0.0
2019-10-31 1.0 0.0 1.0
2020-03-16 0.0 -1.0 0.0
2020-03-17 0.0 0.0 -1.0
2020-04-09 1.0 1.0 0.0
2020-04-13 1.0 0.0 1.0
2020-06-11 0.0 -1.0 0.0
2020-06-12 0.0 0.0 -1.0
2020-06-19 1.0 1.0 0.0
2020-06-22 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_026_SlowMA_45_FastMA_20
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-15 349.600 354.64 285.80825 282.212333 3.595917
2019-01-16 354.000 351.39 290.23775 282.956111 7.281639
2019-05-23 355.500 352.21 363.56750 363.840222 -0.272722
2019-05-24 355.410 354.39 362.54450 363.318444 -0.773944
2019-07-02 374.890 375.43 359.61600 359.122444 0.493556
2019-07-03 376.690 381.72 360.91550 359.370889 1.544611
2019-07-29 335.980 332.70 353.41400 354.535333 -1.121333
2019-07-30 329.200 325.93 350.98050 353.902889 -2.922389
2019-11-04 288.000 292.86 280.61500 280.093778 0.521222
2019-11-05 289.990 288.03 281.48050 280.065778 1.414722
2020-03-18 302.395 315.47 356.81725 357.279889 -0.462639
2020-03-19 324.330 332.03 354.11875 357.131889 -3.013139
2020-04-15 413.000 426.75 366.69500 365.427667 1.267333
2020-04-16 437.000 439.17 372.88000 366.882778 5.997222
2020-06-16 425.760 436.13 426.72600 428.268889 -1.542889
2020-06-17 441.820 447.77 426.56250 429.029333 -2.466833
2020-06-23 466.500 466.26 432.05650 431.507556 0.548944
2020-06-24 468.540 457.85 433.95450 432.041333 1.913167
trade_signal signal_change entry_exit
date
2019-01-15 1.0 1.0 0.0
2019-01-16 1.0 0.0 1.0
2019-05-23 0.0 -1.0 0.0
2019-05-24 0.0 0.0 -1.0
2019-07-02 1.0 1.0 0.0
2019-07-03 1.0 0.0 1.0
2019-07-29 0.0 -1.0 0.0
2019-07-30 0.0 0.0 -1.0
2019-11-04 1.0 1.0 0.0
2019-11-05 1.0 0.0 1.0
2020-03-18 0.0 -1.0 0.0
2020-03-19 0.0 0.0 -1.0
2020-04-15 1.0 1.0 0.0
2020-04-16 1.0 0.0 1.0
2020-06-16 0.0 -1.0 0.0
2020-06-17 0.0 0.0 -1.0
2020-06-23 1.0 1.0 0.0
2020-06-24 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_027_SlowMA_50_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-07 302.10 315.340 283.886 281.5343 2.3517
2019-01-08 319.98 320.270 294.408 281.9031 12.5049
2019-04-16 355.00 359.460 358.208 359.3694 -1.1614
2019-04-17 365.05 354.740 356.372 359.3480 -2.9760
2019-04-23 375.45 381.890 366.756 360.8502 5.9058
2019-04-24 381.07 374.230 369.710 361.4202 8.2898
2019-05-13 352.29 345.260 360.776 364.1068 -3.3308
2019-05-14 348.71 345.610 355.806 363.9982 -8.1922
2019-06-21 365.00 369.210 361.136 359.4056 1.7304
2019-06-24 370.27 371.040 365.220 359.4734 5.7466
2019-07-18 323.76 325.210 358.698 359.4058 -0.7078
2019-07-19 323.40 315.100 347.068 358.4204 -11.3524
2019-10-31 291.00 287.410 283.750 281.6246 2.1254
2019-11-01 288.70 286.810 285.748 281.4222 4.3258
2020-03-12 326.50 315.250 348.952 355.9198 -6.9678
2020-03-13 330.51 336.295 342.417 356.1743 -13.7573
2020-03-30 363.00 370.960 358.156 357.5425 0.6135
2020-03-31 367.93 375.500 361.792 358.2591 3.5329
trade_signal signal_change entry_exit
date
2019-01-07 1.0 1.0 0.0
2019-01-08 1.0 0.0 1.0
2019-04-16 0.0 -1.0 0.0
2019-04-17 0.0 0.0 -1.0
2019-04-23 1.0 1.0 0.0
2019-04-24 1.0 0.0 1.0
2019-05-13 0.0 -1.0 0.0
2019-05-14 0.0 0.0 -1.0
2019-06-21 1.0 1.0 0.0
2019-06-24 1.0 0.0 1.0
2019-07-18 0.0 -1.0 0.0
2019-07-19 0.0 0.0 -1.0
2019-10-31 1.0 1.0 0.0
2019-11-01 1.0 0.0 1.0
2020-03-12 0.0 -1.0 0.0
2020-03-13 0.0 0.0 -1.0
2020-03-30 1.0 1.0 0.0
2020-03-31 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_028_SlowMA_50_FastMA_10
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-09 317.71 319.96 282.4975 282.0449 0.4526
2019-01-10 314.57 324.66 289.5965 282.5415 7.0550
2019-05-16 356.37 359.31 362.7490 364.0060 -1.2570
2019-05-17 356.39 354.45 359.6910 364.0430 -4.3520
2019-06-27 363.20 370.02 360.8970 360.1344 0.7626
2019-06-28 370.26 367.32 363.6560 360.3860 3.2700
2019-07-22 312.00 310.62 355.9640 357.3778 -1.4138
2019-07-23 311.44 307.30 348.7010 356.3030 -7.6020
2019-11-05 289.99 288.03 282.9220 281.3116 1.6104
2019-11-06 288.19 288.59 284.6540 281.2628 3.3912
2020-03-16 306.63 298.84 350.5235 355.5549 -5.0314
2020-03-17 306.18 319.75 345.6215 355.4319 -9.8104
2020-04-03 367.36 361.76 362.2470 359.9033 2.3437
2020-04-06 365.22 379.96 364.2160 360.4393 3.7767
trade_signal signal_change entry_exit
date
2019-01-09 1.0 1.0 0.0
2019-01-10 1.0 0.0 1.0
2019-05-16 0.0 -1.0 0.0
2019-05-17 0.0 0.0 -1.0
2019-06-27 1.0 1.0 0.0
2019-06-28 1.0 0.0 1.0
2019-07-22 0.0 -1.0 0.0
2019-07-23 0.0 0.0 -1.0
2019-11-05 1.0 1.0 0.0
2019-11-06 1.0 0.0 1.0
2020-03-16 0.0 -1.0 0.0
2020-03-17 0.0 0.0 -1.0
2020-04-03 1.0 1.0 0.0
2020-04-06 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_029_SlowMA_50_FastMA_15
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-14 334.240 332.94 286.695667 284.5391 2.156567
2019-01-15 349.600 354.64 293.912333 285.5963 8.316033
2019-05-20 351.230 348.11 363.897333 364.0132 -0.115867
2019-05-21 350.950 354.27 362.812667 363.9214 -1.108733
2019-07-02 374.890 375.43 361.020667 360.6328 0.387867
2019-07-03 376.690 381.72 363.431333 360.6294 2.801933
2019-07-24 310.510 317.94 354.887333 355.7566 -0.869267
2019-07-25 318.860 326.46 351.203333 355.3736 -4.170267
2019-11-04 288.000 292.86 281.674000 281.4506 0.223400
2019-11-05 289.990 288.03 281.926000 281.3116 0.614400
2020-03-17 306.180 319.75 355.067667 355.4319 -0.364233
2020-03-18 302.395 315.47 350.816333 355.0247 -4.208367
2020-04-09 371.060 370.72 363.292000 362.0305 1.261500
2020-04-13 371.310 396.72 367.551333 363.0101 4.541233
trade_signal signal_change entry_exit
date
2019-01-14 1.0 1.0 0.0
2019-01-15 1.0 0.0 1.0
2019-05-20 0.0 -1.0 0.0
2019-05-21 0.0 0.0 -1.0
2019-07-02 1.0 1.0 0.0
2019-07-03 1.0 0.0 1.0
2019-07-24 0.0 -1.0 0.0
2019-07-25 0.0 0.0 -1.0
2019-11-04 1.0 1.0 0.0
2019-11-05 1.0 0.0 1.0
2020-03-17 0.0 -1.0 0.0
2020-03-18 0.0 0.0 -1.0
2020-04-09 1.0 1.0 0.0
2020-04-13 1.0 0.0 1.0
List the signal change and entry/exit points for SMA_030_SlowMA_50_FastMA_20
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-15 349.60 354.64 285.80825 285.5963 0.21195
2019-01-16 354.00 351.39 290.23775 286.2765 3.96125
2019-05-23 355.50 352.21 363.56750 363.8106 -0.24310
2019-05-24 355.41 354.39 362.54450 363.7220 -1.17750
2019-07-03 376.69 381.72 360.91550 360.6294 0.28610
2019-07-05 378.29 380.55 362.08650 360.7558 1.33070
2019-07-29 335.98 332.70 353.41400 354.4572 -1.04320
2019-07-30 329.20 325.93 350.98050 353.8868 -2.90630
2019-11-05 289.99 288.03 281.48050 281.3116 0.16890
2019-11-06 288.19 288.59 282.53350 281.2628 1.27070
2020-03-19 324.33 332.03 354.11875 355.0503 -0.93155
2020-03-20 342.31 332.83 351.75675 354.9217 -3.16495
2020-04-15 413.00 426.75 366.69500 365.7543 0.94070
2020-04-16 437.00 439.17 372.88000 367.1575 5.72250
2020-06-19 449.12 453.72 427.54600 427.8180 -0.27200
2020-06-22 455.01 468.04 429.48200 429.7644 -0.28240
2020-06-23 466.50 466.26 432.05650 431.1552 0.90130
2020-06-24 468.54 457.85 433.95450 432.0412 1.91330
trade_signal signal_change entry_exit
date
2019-01-15 1.0 1.0 0.0
2019-01-16 1.0 0.0 1.0
2019-05-23 0.0 -1.0 0.0
2019-05-24 0.0 0.0 -1.0
2019-07-03 1.0 1.0 0.0
2019-07-05 1.0 0.0 1.0
2019-07-29 0.0 -1.0 0.0
2019-07-30 0.0 0.0 -1.0
2019-11-05 1.0 1.0 0.0
2019-11-06 1.0 0.0 1.0
2020-03-19 0.0 -1.0 0.0
2020-03-20 0.0 0.0 -1.0
2020-04-15 1.0 1.0 0.0
2020-04-16 1.0 0.0 1.0
2020-06-19 0.0 -1.0 0.0
2020-06-22 0.0 0.0 -1.0
2020-06-23 1.0 1.0 0.0
2020-06-24 1.0 0.0 1.0
if verbose:
for key in model_collection:
graph_data = model_collection[key].copy()
title_string = "Simple Moving Average Crossover Model for " + key
fig = plt.figure(figsize=(16,9))
ylabel = stock_symbol + ' price in $'
ax1 = fig.add_subplot(111, ylabel=ylabel, title=title_string)
graph_data['fast_ma'].plot(ax=ax1, color='b', lw=2.)
graph_data['slow_ma'].plot(ax=ax1, color='r', lw=2.)
graph_data['close_price'].plot(ax=ax1, color='g')
ax1.plot(graph_data.loc[graph_data.entry_exit == 1].index, graph_data.close_price[graph_data.entry_exit == 1], '^', markersize=7, color='k',label='buy')
ax1.plot(graph_data.loc[graph_data.entry_exit == -1].index, graph_data.close_price[graph_data.entry_exit == -1], 'v', markersize=7, color='k',label='sell')
plt.legend(loc='upper left')
plt.show()
def trading_portfolio_generation(initial_fund, trading_model):
# Construct a portfolio to track the transactions and returns
portfolio = pd.DataFrame(index=trading_model.index, columns=['trade_action', 'qty_onhand', 'cost_basis', 'sold_transaction', 'gain_loss', 'cash_onhand', 'position_value', 'total_position', 'accumu_return'])
portfolio.iloc[0]['trade_action'] = 0
portfolio.iloc[0]['qty_onhand'] = 0
portfolio.iloc[0]['cost_basis'] = 0.00
portfolio.iloc[0]['sold_transaction'] = 0.00
portfolio.iloc[0]['gain_loss'] = 0.00
portfolio.iloc[0]['cash_onhand'] = initial_capital
portfolio.iloc[0]['position_value'] = 0.00
portfolio.iloc[0]['total_position'] = initial_capital
portfolio.iloc[0]['accumu_return'] = portfolio.iloc[0]['total_position'] - initial_fund
recent_cost = 0
# The conditional parameters below determine how the trading strategy will be carried out
for i in range(1, len(portfolio)):
if (trading_model.iloc[i]['entry_exit'] == 1) and (portfolio.iloc[i-1]['qty_onhand'] == 0):
portfolio.iloc[i]['trade_action'] = 1
portfolio.iloc[i]['qty_onhand'] = portfolio.iloc[i-1]['qty_onhand'] + portfolio.iloc[i]['trade_action']
portfolio.iloc[i]['cost_basis'] = trading_model.iloc[i]['open_price'] * portfolio.iloc[i]['trade_action']
portfolio.iloc[i]['sold_transaction'] = 0.00
portfolio.iloc[i]['gain_loss'] = 0.00
portfolio.iloc[i]['cash_onhand'] = portfolio.iloc[i-1]['cash_onhand'] - portfolio.iloc[i]['cost_basis']
recent_cost = trading_model.iloc[i]['open_price'] * portfolio.iloc[i]['trade_action']
if verbose: print('BOUGHT QTY:', portfolio.iloc[i]['trade_action'], 'on', portfolio.index[i], 'at the price of', trading_model.iloc[i]['open_price'])
elif (trading_model.iloc[i]['entry_exit'] == -1) and (portfolio.iloc[i-1]['qty_onhand'] > 0):
portfolio.iloc[i]['trade_action'] = -1
portfolio.iloc[i]['qty_onhand'] = portfolio.iloc[i-1]['qty_onhand'] + portfolio.iloc[i]['trade_action']
portfolio.iloc[i]['cost_basis'] = 0.00
portfolio.iloc[i]['sold_transaction'] = trading_model.iloc[i]['open_price'] * portfolio.iloc[i]['trade_action'] * -1
portfolio.iloc[i]['gain_loss'] = (recent_cost + (trading_model.iloc[i]['open_price'] * portfolio.iloc[i]['trade_action'])) * -1
portfolio.iloc[i]['cash_onhand'] = portfolio.iloc[i-1]['cash_onhand'] + portfolio.iloc[i]['sold_transaction']
recent_cost = 0.00
if verbose: print('SOLD QTY:', portfolio.iloc[i]['trade_action'], 'on', portfolio.index[i], 'at the price of', trading_model.iloc[i]['open_price'])
else:
portfolio.iloc[i]['trade_action'] = 0
portfolio.iloc[i]['qty_onhand'] = portfolio.iloc[i-1]['qty_onhand']
portfolio.iloc[i]['cost_basis'] = portfolio.iloc[i-1]['cost_basis']
portfolio.iloc[i]['sold_transaction'] = 0.00
portfolio.iloc[i]['gain_loss'] = 0.00
portfolio.iloc[i]['cash_onhand'] = portfolio.iloc[i-1]['cash_onhand']
portfolio.iloc[i]['position_value'] = trading_model.iloc[i]['close_price'] * portfolio.iloc[i]['qty_onhand']
portfolio.iloc[i]['total_position'] = portfolio.iloc[i]['cash_onhand'] + portfolio.iloc[i]['position_value']
portfolio.iloc[i]['accumu_return'] = portfolio.iloc[i]['total_position'] - initial_fund
return portfolio
portfolio_collection = {}
# Build dataframe for reporting model performance summary
performance_summary = pd.DataFrame(columns=['model_name','return_value','return_percent'])
for key in model_collection:
print('Processing portfolio for model:', key)
portfolio_collection[key] = trading_portfolio_generation(initial_capital, model_collection[key])
trade_transactions = portfolio_collection[key][portfolio_collection[key].trade_action != 0]
print(trade_transactions)
print('Accumulated profit/loss for one share of stock with initial capital of $%.0f at the end of modeling period: $%.2f' % (initial_capital, portfolio_collection[key].accumu_return[-1]))
if initial_capital != 0:
return_percentage = portfolio_collection[key].accumu_return[-1] / initial_capital * 100
print('Accumulated return percentage based on the initial capital investment: %.2f%%' % (return_percentage))
else:
return_percentage = None
if trade_transactions.iloc[-1]['trade_action'] == 1:
print('The current status of the model is:', 'Holding a position since', trade_transactions.index.tolist()[-1], '\n')
else:
print('The current status of the model is:', 'Waiting to enter since', trade_transactions.index.tolist()[-1], '\n')
performance_summary = performance_summary.append({'model_name': key, 'return_value': portfolio_collection[key].accumu_return[-1],
'return_percent': return_percentage}, ignore_index=True)
Processing portfolio for model: SMA_001_SlowMA_10_FastMA_05
BOUGHT QTY: 1 on 2019-02-01 00:00:00 at the price of 337.18
SOLD QTY: -1 on 2019-03-05 00:00:00 at the price of 351.46
BOUGHT QTY: 1 on 2019-03-15 00:00:00 at the price of 361.02
SOLD QTY: -1 on 2019-03-29 00:00:00 at the price of 357.16
BOUGHT QTY: 1 on 2019-04-05 00:00:00 at the price of 369.0
SOLD QTY: -1 on 2019-04-12 00:00:00 at the price of 360.69
BOUGHT QTY: 1 on 2019-04-24 00:00:00 at the price of 381.07
SOLD QTY: -1 on 2019-05-10 00:00:00 at the price of 361.62
BOUGHT QTY: 1 on 2019-05-23 00:00:00 at the price of 355.5
SOLD QTY: -1 on 2019-05-30 00:00:00 at the price of 350.55
BOUGHT QTY: 1 on 2019-06-10 00:00:00 at the price of 363.65
SOLD QTY: -1 on 2019-06-17 00:00:00 at the price of 342.69
BOUGHT QTY: 1 on 2019-06-21 00:00:00 at the price of 365.0
SOLD QTY: -1 on 2019-07-16 00:00:00 at the price of 370.09
BOUGHT QTY: 1 on 2019-07-31 00:00:00 at the price of 325.16
SOLD QTY: -1 on 2019-08-06 00:00:00 at the price of 310.58
BOUGHT QTY: 1 on 2019-09-18 00:00:00 at the price of 294.99
SOLD QTY: -1 on 2019-09-23 00:00:00 at the price of 268.345
BOUGHT QTY: 1 on 2019-10-04 00:00:00 at the price of 268.2
SOLD QTY: -1 on 2019-10-23 00:00:00 at the price of 268.06
BOUGHT QTY: 1 on 2019-10-31 00:00:00 at the price of 291.0
SOLD QTY: -1 on 2019-12-05 00:00:00 at the price of 305.27
BOUGHT QTY: 1 on 2019-12-18 00:00:00 at the price of 316.26
SOLD QTY: -1 on 2020-01-03 00:00:00 at the price of 326.78
BOUGHT QTY: 1 on 2020-01-09 00:00:00 at the price of 342.0
SOLD QTY: -1 on 2020-01-23 00:00:00 at the price of 326.04
BOUGHT QTY: 1 on 2020-01-24 00:00:00 at the price of 348.46
SOLD QTY: -1 on 2020-02-26 00:00:00 at the price of 366.31
BOUGHT QTY: 1 on 2020-03-05 00:00:00 at the price of 381.0
SOLD QTY: -1 on 2020-03-10 00:00:00 at the price of 356.425
BOUGHT QTY: 1 on 2020-03-25 00:00:00 at the price of 361.02
SOLD QTY: -1 on 2020-04-28 00:00:00 at the price of 419.99
BOUGHT QTY: 1 on 2020-05-06 00:00:00 at the price of 429.3
SOLD QTY: -1 on 2020-05-27 00:00:00 at the price of 410.38
BOUGHT QTY: 1 on 2020-06-08 00:00:00 at the price of 416.0
SOLD QTY: -1 on 2020-07-01 00:00:00 at the price of 454.0
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-02-01 1 1 337.18 0 0
2019-03-05 -1 0 0 351.46 14.28
2019-03-15 1 1 361.02 0 0
2019-03-29 -1 0 0 357.16 -3.86
2019-04-05 1 1 369 0 0
2019-04-12 -1 0 0 360.69 -8.31
2019-04-24 1 1 381.07 0 0
2019-05-10 -1 0 0 361.62 -19.45
2019-05-23 1 1 355.5 0 0
2019-05-30 -1 0 0 350.55 -4.95
2019-06-10 1 1 363.65 0 0
2019-06-17 -1 0 0 342.69 -20.96
2019-06-21 1 1 365 0 0
2019-07-16 -1 0 0 370.09 5.09
2019-07-31 1 1 325.16 0 0
2019-08-06 -1 0 0 310.58 -14.58
2019-09-18 1 1 294.99 0 0
2019-09-23 -1 0 0 268.345 -26.645
2019-10-04 1 1 268.2 0 0
2019-10-23 -1 0 0 268.06 -0.14
2019-10-31 1 1 291 0 0
2019-12-05 -1 0 0 305.27 14.27
2019-12-18 1 1 316.26 0 0
2020-01-03 -1 0 0 326.78 10.52
2020-01-09 1 1 342 0 0
2020-01-23 -1 0 0 326.04 -15.96
2020-01-24 1 1 348.46 0 0
2020-02-26 -1 0 0 366.31 17.85
2020-03-05 1 1 381 0 0
2020-03-10 -1 0 0 356.425 -24.575
2020-03-25 1 1 361.02 0 0
2020-04-28 -1 0 0 419.99 58.97
2020-05-06 1 1 429.3 0 0
2020-05-27 -1 0 0 410.38 -18.92
2020-06-08 1 1 416 0 0
2020-07-01 -1 0 0 454 38
cash_onhand position_value total_position accumu_return
date
2019-02-01 -337.18 339.85 2.67 2.67
2019-03-05 14.28 0 14.28 14.28
2019-03-15 -346.74 361.46 14.72 14.72
2019-03-29 10.42 0 10.42 10.42
2019-04-05 -358.58 365.49 6.91 6.91
2019-04-12 2.11 0 2.11 2.11
2019-04-24 -378.96 374.23 -4.73 -4.73
2019-05-10 -17.34 0 -17.34 -17.34
2019-05-23 -372.84 352.21 -20.63 -20.63
2019-05-30 -22.29 0 -22.29 -22.29
2019-06-10 -385.94 352.01 -33.93 -33.93
2019-06-17 -43.25 0 -43.25 -43.25
2019-06-21 -408.25 369.21 -39.04 -39.04
2019-07-16 -38.16 0 -38.16 -38.16
2019-07-31 -363.32 322.99 -40.33 -40.33
2019-08-06 -52.74 0 -52.74 -52.74
2019-09-18 -347.73 291.56 -56.17 -56.17
2019-09-23 -79.385 0 -79.385 -79.385
2019-10-04 -347.585 272.79 -74.795 -74.795
2019-10-23 -79.525 0 -79.525 -79.525
2019-10-31 -370.525 287.41 -83.115 -83.115
2019-12-05 -65.255 0 -65.255 -65.255
2019-12-18 -381.515 320.8 -60.715 -60.715
2020-01-03 -54.735 0 -54.735 -54.735
2020-01-09 -396.735 335.66 -61.075 -61.075
2020-01-23 -70.695 0 -70.695 -70.695
2020-01-24 -419.155 353.16 -65.995 -65.995
2020-02-26 -52.845 0 -52.845 -52.845
2020-03-05 -433.845 372.78 -61.065 -61.065
2020-03-10 -77.42 0 -77.42 -77.42
2020-03-25 -438.44 342.39 -96.05 -96.05
2020-04-28 -18.45 0 -18.45 -18.45
2020-05-06 -447.75 434.26 -13.49 -13.49
2020-05-27 -37.37 0 -37.37 -37.37
2020-06-08 -453.37 419.49 -33.88 -33.88
2020-07-01 0.63 0 0.63 0.63
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $0.63
The current status of the model is: Waiting to enter since 2020-07-01 00:00:00
Processing portfolio for model: SMA_002_SlowMA_15_FastMA_05
BOUGHT QTY: 1 on 2019-01-04 00:00:00 at the price of 281.88
SOLD QTY: -1 on 2019-01-28 00:00:00 at the price of 334.7
BOUGHT QTY: 1 on 2019-02-05 00:00:00 at the price of 353.2
SOLD QTY: -1 on 2019-03-06 00:00:00 at the price of 353.6
BOUGHT QTY: 1 on 2019-03-18 00:00:00 at the price of 362.47
SOLD QTY: -1 on 2019-03-29 00:00:00 at the price of 357.16
BOUGHT QTY: 1 on 2019-04-05 00:00:00 at the price of 369.0
SOLD QTY: -1 on 2019-04-15 00:00:00 at the price of 350.71
BOUGHT QTY: 1 on 2019-04-24 00:00:00 at the price of 381.07
SOLD QTY: -1 on 2019-05-10 00:00:00 at the price of 361.62
BOUGHT QTY: 1 on 2019-06-10 00:00:00 at the price of 363.65
SOLD QTY: -1 on 2019-06-14 00:00:00 at the price of 341.63
BOUGHT QTY: 1 on 2019-06-20 00:00:00 at the price of 365.91
SOLD QTY: -1 on 2019-07-18 00:00:00 at the price of 323.76
BOUGHT QTY: 1 on 2019-09-18 00:00:00 at the price of 294.99
SOLD QTY: -1 on 2019-09-23 00:00:00 at the price of 268.345
BOUGHT QTY: 1 on 2019-10-09 00:00:00 at the price of 270.02
SOLD QTY: -1 on 2019-10-24 00:00:00 at the price of 271.81
BOUGHT QTY: 1 on 2019-10-31 00:00:00 at the price of 291.0
SOLD QTY: -1 on 2019-12-09 00:00:00 at the price of 307.35
BOUGHT QTY: 1 on 2019-12-19 00:00:00 at the price of 324.5
SOLD QTY: -1 on 2020-02-27 00:00:00 at the price of 371.46
BOUGHT QTY: 1 on 2020-03-26 00:00:00 at the price of 344.0
SOLD QTY: -1 on 2020-05-01 00:00:00 at the price of 415.1
BOUGHT QTY: 1 on 2020-05-07 00:00:00 at the price of 436.89
SOLD QTY: -1 on 2020-05-27 00:00:00 at the price of 410.38
BOUGHT QTY: 1 on 2020-06-12 00:00:00 at the price of 429.0
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-04 1 1 281.88 0 0
2019-01-28 -1 0 0 334.7 52.82
2019-02-05 1 1 353.2 0 0
2019-03-06 -1 0 0 353.6 0.4
2019-03-18 1 1 362.47 0 0
2019-03-29 -1 0 0 357.16 -5.31
2019-04-05 1 1 369 0 0
2019-04-15 -1 0 0 350.71 -18.29
2019-04-24 1 1 381.07 0 0
2019-05-10 -1 0 0 361.62 -19.45
2019-06-10 1 1 363.65 0 0
2019-06-14 -1 0 0 341.63 -22.02
2019-06-20 1 1 365.91 0 0
2019-07-18 -1 0 0 323.76 -42.15
2019-09-18 1 1 294.99 0 0
2019-09-23 -1 0 0 268.345 -26.645
2019-10-09 1 1 270.02 0 0
2019-10-24 -1 0 0 271.81 1.79
2019-10-31 1 1 291 0 0
2019-12-09 -1 0 0 307.35 16.35
2019-12-19 1 1 324.5 0 0
2020-02-27 -1 0 0 371.46 46.96
2020-03-26 1 1 344 0 0
2020-05-01 -1 0 0 415.1 71.1
2020-05-07 1 1 436.89 0 0
2020-05-27 -1 0 0 410.38 -26.51
2020-06-12 1 1 429 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-04 -281.88 297.57 15.69 15.69
2019-01-28 52.82 0 52.82 52.82
2019-02-05 -300.38 355.81 55.43 55.43
2019-03-06 53.22 0 53.22 53.22
2019-03-18 -309.25 363.44 54.19 54.19
2019-03-29 47.91 0 47.91 47.91
2019-04-05 -321.09 365.49 44.4 44.4
2019-04-15 29.62 0 29.62 29.62
2019-04-24 -351.45 374.23 22.78 22.78
2019-05-10 10.17 0 10.17 10.17
2019-06-10 -353.48 352.01 -1.47 -1.47
2019-06-14 -11.85 0 -11.85 -11.85
2019-06-20 -377.76 365.21 -12.55 -12.55
2019-07-18 -54 0 -54 -54
2019-09-18 -348.99 291.56 -57.43 -57.43
2019-09-23 -80.645 0 -80.645 -80.645
2019-10-09 -350.665 267.53 -83.135 -83.135
2019-10-24 -78.855 0 -78.855 -78.855
2019-10-31 -369.855 287.41 -82.445 -82.445
2019-12-09 -62.505 0 -62.505 -62.505
2019-12-19 -387.005 332.22 -54.785 -54.785
2020-02-27 -15.545 0 -15.545 -15.545
2020-03-26 -359.545 362.99 3.445 3.445
2020-05-01 55.555 0 55.555 55.555
2020-05-07 -381.335 436.53 55.195 55.195
2020-05-27 29.045 0 29.045 29.045
2020-06-12 -399.955 418.07 18.115 18.115
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $85.69
The current status of the model is: Holding a position since 2020-06-12 00:00:00
Processing portfolio for model: SMA_003_SlowMA_15_FastMA_10
BOUGHT QTY: 1 on 2019-01-08 00:00:00 at the price of 319.98
SOLD QTY: -1 on 2019-02-01 00:00:00 at the price of 337.18
BOUGHT QTY: 1 on 2019-02-07 00:00:00 at the price of 347.9
SOLD QTY: -1 on 2019-03-08 00:00:00 at the price of 345.75
BOUGHT QTY: 1 on 2019-03-20 00:00:00 at the price of 358.91
SOLD QTY: -1 on 2019-04-04 00:00:00 at the price of 370.07
BOUGHT QTY: 1 on 2019-04-11 00:00:00 at the price of 365.0
SOLD QTY: -1 on 2019-04-18 00:00:00 at the price of 355.0
BOUGHT QTY: 1 on 2019-04-29 00:00:00 at the price of 373.68
SOLD QTY: -1 on 2019-05-13 00:00:00 at the price of 352.29
BOUGHT QTY: 1 on 2019-06-18 00:00:00 at the price of 355.57
SOLD QTY: -1 on 2019-06-25 00:00:00 at the price of 370.75
BOUGHT QTY: 1 on 2019-06-26 00:00:00 at the price of 361.6
SOLD QTY: -1 on 2019-07-19 00:00:00 at the price of 323.4
BOUGHT QTY: 1 on 2019-08-08 00:00:00 at the price of 311.03
SOLD QTY: -1 on 2019-08-12 00:00:00 at the price of 305.46
BOUGHT QTY: 1 on 2019-10-10 00:00:00 at the price of 265.97
SOLD QTY: -1 on 2019-10-30 00:00:00 at the price of 284.34
BOUGHT QTY: 1 on 2019-11-06 00:00:00 at the price of 288.19
SOLD QTY: -1 on 2019-12-11 00:00:00 at the price of 294.49
BOUGHT QTY: 1 on 2019-12-23 00:00:00 at the price of 337.76
SOLD QTY: -1 on 2020-01-10 00:00:00 at the price of 337.13
BOUGHT QTY: 1 on 2020-01-15 00:00:00 at the price of 338.68
SOLD QTY: -1 on 2020-03-03 00:00:00 at the price of 381.03
BOUGHT QTY: 1 on 2020-03-31 00:00:00 at the price of 367.93
SOLD QTY: -1 on 2020-05-05 00:00:00 at the price of 427.555
BOUGHT QTY: 1 on 2020-05-13 00:00:00 at the price of 435.69
SOLD QTY: -1 on 2020-05-29 00:00:00 at the price of 417.46
BOUGHT QTY: 1 on 2020-06-12 00:00:00 at the price of 429.0
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-08 1 1 319.98 0 0
2019-02-01 -1 0 0 337.18 17.2
2019-02-07 1 1 347.9 0 0
2019-03-08 -1 0 0 345.75 -2.15
2019-03-20 1 1 358.91 0 0
2019-04-04 -1 0 0 370.07 11.16
2019-04-11 1 1 365 0 0
2019-04-18 -1 0 0 355 -10
2019-04-29 1 1 373.68 0 0
2019-05-13 -1 0 0 352.29 -21.39
2019-06-18 1 1 355.57 0 0
2019-06-25 -1 0 0 370.75 15.18
2019-06-26 1 1 361.6 0 0
2019-07-19 -1 0 0 323.4 -38.2
2019-08-08 1 1 311.03 0 0
2019-08-12 -1 0 0 305.46 -5.57
2019-10-10 1 1 265.97 0 0
2019-10-30 -1 0 0 284.34 18.37
2019-11-06 1 1 288.19 0 0
2019-12-11 -1 0 0 294.49 6.3
2019-12-23 1 1 337.76 0 0
2020-01-10 -1 0 0 337.13 -0.63
2020-01-15 1 1 338.68 0 0
2020-03-03 -1 0 0 381.03 42.35
2020-03-31 1 1 367.93 0 0
2020-05-05 -1 0 0 427.555 59.625
2020-05-13 1 1 435.69 0 0
2020-05-29 -1 0 0 417.46 -18.23
2020-06-12 1 1 429 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-08 -319.98 320.27 0.29 0.29
2019-02-01 17.2 0 17.2 17.2
2019-02-07 -330.7 344.71 14.01 14.01
2019-03-08 15.05 0 15.05 15.05
2019-03-20 -343.86 375.22 31.36 31.36
2019-04-04 26.21 0 26.21 26.21
2019-04-11 -338.79 367.65 28.86 28.86
2019-04-18 16.21 0 16.21 16.21
2019-04-29 -357.47 371.83 14.36 14.36
2019-05-13 -5.18 0 -5.18 -5.18
2019-06-18 -360.75 357.12 -3.63 -3.63
2019-06-25 10 0 10 10
2019-06-26 -351.6 362.2 10.6 10.6
2019-07-19 -28.2 0 -28.2 -28.2
2019-08-08 -339.23 315.9 -23.33 -23.33
2019-08-12 -33.77 0 -33.77 -33.77
2019-10-10 -299.74 280.48 -19.26 -19.26
2019-10-30 -15.4 0 -15.4 -15.4
2019-11-06 -303.59 288.59 -15 -15
2019-12-11 -9.1 0 -9.1 -9.1
2019-12-23 -346.86 333.1 -13.76 -13.76
2020-01-10 -9.73 0 -9.73 -9.73
2020-01-15 -348.41 339.07 -9.34 -9.34
2020-03-03 32.62 0 32.62 32.62
2020-03-31 -335.31 375.5 40.19 40.19
2020-05-05 92.245 0 92.245 92.245
2020-05-13 -343.445 438.27 94.825 94.825
2020-05-29 74.015 0 74.015 74.015
2020-06-12 -354.985 418.07 63.085 63.085
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $130.65
The current status of the model is: Holding a position since 2020-06-12 00:00:00
Processing portfolio for model: SMA_004_SlowMA_20_FastMA_05
BOUGHT QTY: 1 on 2019-01-07 00:00:00 at the price of 302.1
SOLD QTY: -1 on 2019-03-07 00:00:00 at the price of 360.16
BOUGHT QTY: 1 on 2019-03-18 00:00:00 at the price of 362.47
SOLD QTY: -1 on 2019-03-29 00:00:00 at the price of 357.16
BOUGHT QTY: 1 on 2019-04-04 00:00:00 at the price of 370.07
SOLD QTY: -1 on 2019-04-15 00:00:00 at the price of 350.71
BOUGHT QTY: 1 on 2019-04-24 00:00:00 at the price of 381.07
SOLD QTY: -1 on 2019-05-13 00:00:00 at the price of 352.29
BOUGHT QTY: 1 on 2019-06-10 00:00:00 at the price of 363.65
SOLD QTY: -1 on 2019-06-14 00:00:00 at the price of 341.63
BOUGHT QTY: 1 on 2019-06-21 00:00:00 at the price of 365.0
SOLD QTY: -1 on 2019-07-18 00:00:00 at the price of 323.76
BOUGHT QTY: 1 on 2019-09-19 00:00:00 at the price of 291.56
SOLD QTY: -1 on 2019-09-23 00:00:00 at the price of 268.345
BOUGHT QTY: 1 on 2019-10-14 00:00:00 at the price of 283.93
SOLD QTY: -1 on 2019-10-25 00:00:00 at the price of 270.68
BOUGHT QTY: 1 on 2019-10-31 00:00:00 at the price of 291.0
SOLD QTY: -1 on 2019-12-11 00:00:00 at the price of 294.49
BOUGHT QTY: 1 on 2019-12-19 00:00:00 at the price of 324.5
SOLD QTY: -1 on 2020-03-02 00:00:00 at the price of 373.11
BOUGHT QTY: 1 on 2020-03-27 00:00:00 at the price of 359.09
SOLD QTY: -1 on 2020-05-28 00:00:00 at the price of 417.24
BOUGHT QTY: 1 on 2020-06-17 00:00:00 at the price of 441.82
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-07 1 1 302.1 0 0
2019-03-07 -1 0 0 360.16 58.06
2019-03-18 1 1 362.47 0 0
2019-03-29 -1 0 0 357.16 -5.31
2019-04-04 1 1 370.07 0 0
2019-04-15 -1 0 0 350.71 -19.36
2019-04-24 1 1 381.07 0 0
2019-05-13 -1 0 0 352.29 -28.78
2019-06-10 1 1 363.65 0 0
2019-06-14 -1 0 0 341.63 -22.02
2019-06-21 1 1 365 0 0
2019-07-18 -1 0 0 323.76 -41.24
2019-09-19 1 1 291.56 0 0
2019-09-23 -1 0 0 268.345 -23.215
2019-10-14 1 1 283.93 0 0
2019-10-25 -1 0 0 270.68 -13.25
2019-10-31 1 1 291 0 0
2019-12-11 -1 0 0 294.49 3.49
2019-12-19 1 1 324.5 0 0
2020-03-02 -1 0 0 373.11 48.61
2020-03-27 1 1 359.09 0 0
2020-05-28 -1 0 0 417.24 58.15
2020-06-17 1 1 441.82 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-07 -302.1 315.34 13.24 13.24
2019-03-07 58.06 0 58.06 58.06
2019-03-18 -304.41 363.44 59.03 59.03
2019-03-29 52.75 0 52.75 52.75
2019-04-04 -317.32 367.88 50.56 50.56
2019-04-15 33.39 0 33.39 33.39
2019-04-24 -347.68 374.23 26.55 26.55
2019-05-13 4.61 0 4.61 4.61
2019-06-10 -359.04 352.01 -7.03 -7.03
2019-06-14 -17.41 0 -17.41 -17.41
2019-06-21 -382.41 369.21 -13.2 -13.2
2019-07-18 -58.65 0 -58.65 -58.65
2019-09-19 -350.21 286.6 -63.61 -63.61
2019-09-23 -81.865 0 -81.865 -81.865
2019-10-14 -365.795 285.53 -80.265 -80.265
2019-10-25 -95.115 0 -95.115 -95.115
2019-10-31 -386.115 287.41 -98.705 -98.705
2019-12-11 -91.625 0 -91.625 -91.625
2019-12-19 -416.125 332.22 -83.905 -83.905
2020-03-02 -43.015 0 -43.015 -43.015
2020-03-27 -402.105 357.12 -44.985 -44.985
2020-05-28 15.135 0 15.135 15.135
2020-06-17 -426.685 447.77 21.085 21.085
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $58.96
The current status of the model is: Holding a position since 2020-06-17 00:00:00
Processing portfolio for model: SMA_005_SlowMA_20_FastMA_10
BOUGHT QTY: 1 on 2019-01-09 00:00:00 at the price of 317.71
SOLD QTY: -1 on 2019-02-05 00:00:00 at the price of 353.2
BOUGHT QTY: 1 on 2019-02-06 00:00:00 at the price of 357.0
SOLD QTY: -1 on 2019-03-12 00:00:00 at the price of 359.37
BOUGHT QTY: 1 on 2019-03-21 00:00:00 at the price of 374.0
SOLD QTY: -1 on 2019-04-08 00:00:00 at the price of 365.11
BOUGHT QTY: 1 on 2019-04-11 00:00:00 at the price of 365.0
SOLD QTY: -1 on 2019-04-16 00:00:00 at the price of 355.0
BOUGHT QTY: 1 on 2019-04-24 00:00:00 at the price of 381.07
SOLD QTY: -1 on 2019-04-29 00:00:00 at the price of 373.68
BOUGHT QTY: 1 on 2019-04-30 00:00:00 at the price of 369.56
SOLD QTY: -1 on 2019-05-15 00:00:00 at the price of 343.34
BOUGHT QTY: 1 on 2019-06-18 00:00:00 at the price of 355.57
SOLD QTY: -1 on 2019-07-19 00:00:00 at the price of 323.4
BOUGHT QTY: 1 on 2019-10-15 00:00:00 at the price of 283.82
SOLD QTY: -1 on 2019-11-01 00:00:00 at the price of 288.7
BOUGHT QTY: 1 on 2019-11-05 00:00:00 at the price of 289.99
SOLD QTY: -1 on 2019-12-13 00:00:00 at the price of 298.5
BOUGHT QTY: 1 on 2019-12-23 00:00:00 at the price of 337.76
SOLD QTY: -1 on 2020-03-05 00:00:00 at the price of 381.0
BOUGHT QTY: 1 on 2020-04-01 00:00:00 at the price of 376.05
SOLD QTY: -1 on 2020-05-11 00:00:00 at the price of 436.33
BOUGHT QTY: 1 on 2020-05-13 00:00:00 at the price of 435.69
SOLD QTY: -1 on 2020-06-02 00:00:00 at the price of 425.87
BOUGHT QTY: 1 on 2020-06-18 00:00:00 at the price of 448.73
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-09 1 1 317.71 0 0
2019-02-05 -1 0 0 353.2 35.49
2019-02-06 1 1 357 0 0
2019-03-12 -1 0 0 359.37 2.37
2019-03-21 1 1 374 0 0
2019-04-08 -1 0 0 365.11 -8.89
2019-04-11 1 1 365 0 0
2019-04-16 -1 0 0 355 -10
2019-04-24 1 1 381.07 0 0
2019-04-29 -1 0 0 373.68 -7.39
2019-04-30 1 1 369.56 0 0
2019-05-15 -1 0 0 343.34 -26.22
2019-06-18 1 1 355.57 0 0
2019-07-19 -1 0 0 323.4 -32.17
2019-10-15 1 1 283.82 0 0
2019-11-01 -1 0 0 288.7 4.88
2019-11-05 1 1 289.99 0 0
2019-12-13 -1 0 0 298.5 8.51
2019-12-23 1 1 337.76 0 0
2020-03-05 -1 0 0 381 43.24
2020-04-01 1 1 376.05 0 0
2020-05-11 -1 0 0 436.33 60.28
2020-05-13 1 1 435.69 0 0
2020-06-02 -1 0 0 425.87 -9.82
2020-06-18 1 1 448.73 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-09 -317.71 319.96 2.25 2.25
2019-02-05 35.49 0 35.49 35.49
2019-02-06 -321.51 352.19 30.68 30.68
2019-03-12 37.86 0 37.86 37.86
2019-03-21 -336.14 377.87 41.73 41.73
2019-04-08 28.97 0 28.97 28.97
2019-04-11 -336.03 367.65 31.62 31.62
2019-04-16 18.97 0 18.97 18.97
2019-04-24 -362.1 374.23 12.13 12.13
2019-04-29 11.58 0 11.58 11.58
2019-04-30 -357.98 370.54 12.56 12.56
2019-05-15 -14.64 0 -14.64 -14.64
2019-06-18 -370.21 357.12 -13.09 -13.09
2019-07-19 -46.81 0 -46.81 -46.81
2019-10-15 -330.63 284.25 -46.38 -46.38
2019-11-01 -41.93 0 -41.93 -41.93
2019-11-05 -331.92 288.03 -43.89 -43.89
2019-12-13 -33.42 0 -33.42 -33.42
2019-12-23 -371.18 333.1 -38.08 -38.08
2020-03-05 9.82 0 9.82 9.82
2020-04-01 -366.23 364.08 -2.15 -2.15
2020-05-11 70.1 0 70.1 70.1
2020-05-13 -365.59 438.27 72.68 72.68
2020-06-02 60.28 0 60.28 60.28
2020-06-18 -388.45 449.87 61.42 61.42
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $97.19
The current status of the model is: Holding a position since 2020-06-18 00:00:00
Processing portfolio for model: SMA_006_SlowMA_20_FastMA_15
BOUGHT QTY: 1 on 2019-01-10 00:00:00 at the price of 314.57
SOLD QTY: -1 on 2019-02-08 00:00:00 at the price of 338.0
BOUGHT QTY: 1 on 2019-02-14 00:00:00 at the price of 351.75
SOLD QTY: -1 on 2019-03-15 00:00:00 at the price of 361.02
BOUGHT QTY: 1 on 2019-03-26 00:00:00 at the price of 367.87
SOLD QTY: -1 on 2019-04-12 00:00:00 at the price of 360.69
BOUGHT QTY: 1 on 2019-04-22 00:00:00 at the price of 359.7
SOLD QTY: -1 on 2019-04-29 00:00:00 at the price of 373.68
BOUGHT QTY: 1 on 2019-05-02 00:00:00 at the price of 378.0
SOLD QTY: -1 on 2019-05-16 00:00:00 at the price of 356.37
BOUGHT QTY: 1 on 2019-06-11 00:00:00 at the price of 355.0
SOLD QTY: -1 on 2019-06-12 00:00:00 at the price of 351.82
BOUGHT QTY: 1 on 2019-06-24 00:00:00 at the price of 370.27
SOLD QTY: -1 on 2019-07-23 00:00:00 at the price of 311.44
BOUGHT QTY: 1 on 2019-08-15 00:00:00 at the price of 299.5
SOLD QTY: -1 on 2019-08-16 00:00:00 at the price of 298.86
BOUGHT QTY: 1 on 2019-10-17 00:00:00 at the price of 304.49
SOLD QTY: -1 on 2019-11-07 00:00:00 at the price of 290.7
BOUGHT QTY: 1 on 2019-11-12 00:00:00 at the price of 295.32
SOLD QTY: -1 on 2019-12-17 00:00:00 at the price of 307.36
BOUGHT QTY: 1 on 2019-12-26 00:00:00 at the price of 334.6
SOLD QTY: -1 on 2020-01-21 00:00:00 at the price of 340.0
BOUGHT QTY: 1 on 2020-01-22 00:00:00 at the price of 332.55
SOLD QTY: -1 on 2020-03-10 00:00:00 at the price of 356.425
BOUGHT QTY: 1 on 2020-04-06 00:00:00 at the price of 365.22
SOLD QTY: -1 on 2020-05-12 00:00:00 at the price of 442.0
BOUGHT QTY: 1 on 2020-05-18 00:00:00 at the price of 451.16
SOLD QTY: -1 on 2020-06-03 00:00:00 at the price of 426.95
BOUGHT QTY: 1 on 2020-06-19 00:00:00 at the price of 449.12
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-10 1 1 314.57 0 0
2019-02-08 -1 0 0 338 23.43
2019-02-14 1 1 351.75 0 0
2019-03-15 -1 0 0 361.02 9.27
2019-03-26 1 1 367.87 0 0
2019-04-12 -1 0 0 360.69 -7.18
2019-04-22 1 1 359.7 0 0
2019-04-29 -1 0 0 373.68 13.98
2019-05-02 1 1 378 0 0
2019-05-16 -1 0 0 356.37 -21.63
2019-06-11 1 1 355 0 0
2019-06-12 -1 0 0 351.82 -3.18
2019-06-24 1 1 370.27 0 0
2019-07-23 -1 0 0 311.44 -58.83
2019-08-15 1 1 299.5 0 0
2019-08-16 -1 0 0 298.86 -0.64
2019-10-17 1 1 304.49 0 0
2019-11-07 -1 0 0 290.7 -13.79
2019-11-12 1 1 295.32 0 0
2019-12-17 -1 0 0 307.36 12.04
2019-12-26 1 1 334.6 0 0
2020-01-21 -1 0 0 340 5.4
2020-01-22 1 1 332.55 0 0
2020-03-10 -1 0 0 356.425 23.875
2020-04-06 1 1 365.22 0 0
2020-05-12 -1 0 0 442 76.78
2020-05-18 1 1 451.16 0 0
2020-06-03 -1 0 0 426.95 -24.21
2020-06-19 1 1 449.12 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-10 -314.57 324.66 10.09 10.09
2019-02-08 23.43 0 23.43 23.43
2019-02-14 -328.32 359.07 30.75 30.75
2019-03-15 32.7 0 32.7 32.7
2019-03-26 -335.17 359.97 24.8 24.8
2019-04-12 25.52 0 25.52 25.52
2019-04-22 -334.18 377.34 43.16 43.16
2019-04-29 39.5 0 39.5 39.5
2019-05-02 -338.5 379.06 40.56 40.56
2019-05-16 17.87 0 17.87 17.87
2019-06-11 -337.13 351.27 14.14 14.14
2019-06-12 14.69 0 14.69 14.69
2019-06-24 -355.58 371.04 15.46 15.46
2019-07-23 -44.14 0 -44.14 -44.14
2019-08-15 -343.64 295.76 -47.88 -47.88
2019-08-16 -44.78 0 -44.78 -44.78
2019-10-17 -349.27 293.35 -55.92 -55.92
2019-11-07 -58.57 0 -58.57 -58.57
2019-11-12 -353.89 292.01 -61.88 -61.88
2019-12-17 -46.53 0 -46.53 -46.53
2019-12-26 -381.13 332.63 -48.5 -48.5
2020-01-21 -41.13 0 -41.13 -41.13
2020-01-22 -373.68 326 -47.68 -47.68
2020-03-10 -17.255 0 -17.255 -17.255
2020-04-06 -382.475 379.96 -2.515 -2.515
2020-05-12 59.525 0 59.525 59.525
2020-05-18 -391.635 452.58 60.945 60.945
2020-06-03 35.315 0 35.315 35.315
2020-06-19 -413.805 453.72 39.915 39.915
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $71.83
The current status of the model is: Holding a position since 2020-06-19 00:00:00
Processing portfolio for model: SMA_007_SlowMA_25_FastMA_05
BOUGHT QTY: 1 on 2019-01-07 00:00:00 at the price of 302.1
SOLD QTY: -1 on 2019-03-11 00:00:00 at the price of 352.0
BOUGHT QTY: 1 on 2019-03-15 00:00:00 at the price of 361.02
SOLD QTY: -1 on 2019-03-29 00:00:00 at the price of 357.16
BOUGHT QTY: 1 on 2019-04-04 00:00:00 at the price of 370.07
SOLD QTY: -1 on 2019-04-15 00:00:00 at the price of 350.71
BOUGHT QTY: 1 on 2019-04-24 00:00:00 at the price of 381.07
SOLD QTY: -1 on 2019-05-13 00:00:00 at the price of 352.29
BOUGHT QTY: 1 on 2019-06-11 00:00:00 at the price of 355.0
SOLD QTY: -1 on 2019-06-14 00:00:00 at the price of 341.63
BOUGHT QTY: 1 on 2019-06-21 00:00:00 at the price of 365.0
SOLD QTY: -1 on 2019-07-19 00:00:00 at the price of 323.4
BOUGHT QTY: 1 on 2019-10-15 00:00:00 at the price of 283.82
SOLD QTY: -1 on 2019-10-25 00:00:00 at the price of 270.68
BOUGHT QTY: 1 on 2019-10-29 00:00:00 at the price of 281.87
SOLD QTY: -1 on 2019-12-12 00:00:00 at the price of 295.67
BOUGHT QTY: 1 on 2019-12-19 00:00:00 at the price of 324.5
SOLD QTY: -1 on 2020-03-10 00:00:00 at the price of 356.425
BOUGHT QTY: 1 on 2020-03-30 00:00:00 at the price of 363.0
SOLD QTY: -1 on 2020-05-28 00:00:00 at the price of 417.24
BOUGHT QTY: 1 on 2020-06-19 00:00:00 at the price of 449.12
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-07 1 1 302.1 0 0
2019-03-11 -1 0 0 352 49.9
2019-03-15 1 1 361.02 0 0
2019-03-29 -1 0 0 357.16 -3.86
2019-04-04 1 1 370.07 0 0
2019-04-15 -1 0 0 350.71 -19.36
2019-04-24 1 1 381.07 0 0
2019-05-13 -1 0 0 352.29 -28.78
2019-06-11 1 1 355 0 0
2019-06-14 -1 0 0 341.63 -13.37
2019-06-21 1 1 365 0 0
2019-07-19 -1 0 0 323.4 -41.6
2019-10-15 1 1 283.82 0 0
2019-10-25 -1 0 0 270.68 -13.14
2019-10-29 1 1 281.87 0 0
2019-12-12 -1 0 0 295.67 13.8
2019-12-19 1 1 324.5 0 0
2020-03-10 -1 0 0 356.425 31.925
2020-03-30 1 1 363 0 0
2020-05-28 -1 0 0 417.24 54.24
2020-06-19 1 1 449.12 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-07 -302.1 315.34 13.24 13.24
2019-03-11 49.9 0 49.9 49.9
2019-03-15 -311.12 361.46 50.34 50.34
2019-03-29 46.04 0 46.04 46.04
2019-04-04 -324.03 367.88 43.85 43.85
2019-04-15 26.68 0 26.68 26.68
2019-04-24 -354.39 374.23 19.84 19.84
2019-05-13 -2.1 0 -2.1 -2.1
2019-06-11 -357.1 351.27 -5.83 -5.83
2019-06-14 -15.47 0 -15.47 -15.47
2019-06-21 -380.47 369.21 -11.26 -11.26
2019-07-19 -57.07 0 -57.07 -57.07
2019-10-15 -340.89 284.25 -56.64 -56.64
2019-10-25 -70.21 0 -70.21 -70.21
2019-10-29 -352.08 281.21 -70.87 -70.87
2019-12-12 -56.41 0 -56.41 -56.41
2019-12-19 -380.91 332.22 -48.69 -48.69
2020-03-10 -24.485 0 -24.485 -24.485
2020-03-30 -387.485 370.96 -16.525 -16.525
2020-05-28 29.755 0 29.755 29.755
2020-06-19 -419.365 453.72 34.355 34.355
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $66.28
The current status of the model is: Holding a position since 2020-06-19 00:00:00
Processing portfolio for model: SMA_008_SlowMA_25_FastMA_10
BOUGHT QTY: 1 on 2019-01-09 00:00:00 at the price of 317.71
SOLD QTY: -1 on 2019-03-13 00:00:00 at the price of 355.81
BOUGHT QTY: 1 on 2019-03-21 00:00:00 at the price of 374.0
SOLD QTY: -1 on 2019-04-17 00:00:00 at the price of 365.05
BOUGHT QTY: 1 on 2019-04-26 00:00:00 at the price of 368.35
SOLD QTY: -1 on 2019-05-16 00:00:00 at the price of 356.37
BOUGHT QTY: 1 on 2019-06-18 00:00:00 at the price of 355.57
SOLD QTY: -1 on 2019-06-19 00:00:00 at the price of 361.72
BOUGHT QTY: 1 on 2019-06-21 00:00:00 at the price of 365.0
SOLD QTY: -1 on 2019-07-22 00:00:00 at the price of 312.0
BOUGHT QTY: 1 on 2019-10-17 00:00:00 at the price of 304.49
SOLD QTY: -1 on 2019-12-16 00:00:00 at the price of 300.85
BOUGHT QTY: 1 on 2019-12-20 00:00:00 at the price of 335.0
SOLD QTY: -1 on 2020-03-09 00:00:00 at the price of 343.86
BOUGHT QTY: 1 on 2020-04-02 00:00:00 at the price of 364.08
SOLD QTY: -1 on 2020-06-03 00:00:00 at the price of 426.95
BOUGHT QTY: 1 on 2020-06-22 00:00:00 at the price of 455.01
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-09 1 1 317.71 0 0
2019-03-13 -1 0 0 355.81 38.1
2019-03-21 1 1 374 0 0
2019-04-17 -1 0 0 365.05 -8.95
2019-04-26 1 1 368.35 0 0
2019-05-16 -1 0 0 356.37 -11.98
2019-06-18 1 1 355.57 0 0
2019-06-19 -1 0 0 361.72 6.15
2019-06-21 1 1 365 0 0
2019-07-22 -1 0 0 312 -53
2019-10-17 1 1 304.49 0 0
2019-12-16 -1 0 0 300.85 -3.64
2019-12-20 1 1 335 0 0
2020-03-09 -1 0 0 343.86 8.86
2020-04-02 1 1 364.08 0 0
2020-06-03 -1 0 0 426.95 62.87
2020-06-22 1 1 455.01 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-09 -317.71 319.96 2.25 2.25
2019-03-13 38.1 0 38.1 38.1
2019-03-21 -335.9 377.87 41.97 41.97
2019-04-17 29.15 0 29.15 29.15
2019-04-26 -339.2 374.85 35.65 35.65
2019-05-16 17.17 0 17.17 17.17
2019-06-18 -338.4 357.12 18.72 18.72
2019-06-19 23.32 0 23.32 23.32
2019-06-21 -341.68 369.21 27.53 27.53
2019-07-22 -29.68 0 -29.68 -29.68
2019-10-17 -334.17 293.35 -40.82 -40.82
2019-12-16 -33.32 0 -33.32 -33.32
2019-12-20 -368.32 336.9 -31.42 -31.42
2020-03-09 -24.46 0 -24.46 -24.46
2020-04-02 -388.54 370.08 -18.46 -18.46
2020-06-03 38.41 0 38.41 38.41
2020-06-22 -416.6 468.04 51.44 51.44
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $69.04
The current status of the model is: Holding a position since 2020-06-22 00:00:00
Processing portfolio for model: SMA_009_SlowMA_25_FastMA_15
BOUGHT QTY: 1 on 2019-01-10 00:00:00 at the price of 314.57
SOLD QTY: -1 on 2019-03-20 00:00:00 at the price of 358.91
BOUGHT QTY: 1 on 2019-03-26 00:00:00 at the price of 367.87
SOLD QTY: -1 on 2019-04-15 00:00:00 at the price of 350.71
BOUGHT QTY: 1 on 2019-04-23 00:00:00 at the price of 375.45
SOLD QTY: -1 on 2019-05-21 00:00:00 at the price of 350.95
BOUGHT QTY: 1 on 2019-06-24 00:00:00 at the price of 370.27
SOLD QTY: -1 on 2019-07-23 00:00:00 at the price of 311.44
BOUGHT QTY: 1 on 2019-10-21 00:00:00 at the price of 272.89
SOLD QTY: -1 on 2020-03-11 00:00:00 at the price of 358.92
BOUGHT QTY: 1 on 2020-04-07 00:00:00 at the price of 380.0
SOLD QTY: -1 on 2020-06-08 00:00:00 at the price of 416.0
BOUGHT QTY: 1 on 2020-06-23 00:00:00 at the price of 466.5
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-10 1 1 314.57 0 0
2019-03-20 -1 0 0 358.91 44.34
2019-03-26 1 1 367.87 0 0
2019-04-15 -1 0 0 350.71 -17.16
2019-04-23 1 1 375.45 0 0
2019-05-21 -1 0 0 350.95 -24.5
2019-06-24 1 1 370.27 0 0
2019-07-23 -1 0 0 311.44 -58.83
2019-10-21 1 1 272.89 0 0
2020-03-11 -1 0 0 358.92 86.03
2020-04-07 1 1 380 0 0
2020-06-08 -1 0 0 416 36
2020-06-23 1 1 466.5 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-10 -314.57 324.66 10.09 10.09
2019-03-20 44.34 0 44.34 44.34
2019-03-26 -323.53 359.97 36.44 36.44
2019-04-15 27.18 0 27.18 27.18
2019-04-23 -348.27 381.89 33.62 33.62
2019-05-21 2.68 0 2.68 2.68
2019-06-24 -367.59 371.04 3.45 3.45
2019-07-23 -56.15 0 -56.15 -56.15
2019-10-21 -329.04 278.05 -50.99 -50.99
2020-03-11 29.88 0 29.88 29.88
2020-04-07 -350.12 372.28 22.16 22.16
2020-06-08 65.88 0 65.88 65.88
2020-06-23 -400.62 466.26 65.64 65.64
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $85.02
The current status of the model is: Holding a position since 2020-06-23 00:00:00
Processing portfolio for model: SMA_010_SlowMA_25_FastMA_20
BOUGHT QTY: 1 on 2019-01-11 00:00:00 at the price of 330.96
SOLD QTY: -1 on 2019-02-19 00:00:00 at the price of 355.8
BOUGHT QTY: 1 on 2019-02-21 00:00:00 at the price of 360.03
SOLD QTY: -1 on 2019-03-26 00:00:00 at the price of 367.87
BOUGHT QTY: 1 on 2019-04-02 00:00:00 at the price of 366.25
SOLD QTY: -1 on 2019-04-18 00:00:00 at the price of 355.0
BOUGHT QTY: 1 on 2019-04-26 00:00:00 at the price of 368.35
SOLD QTY: -1 on 2019-05-22 00:00:00 at the price of 358.01
BOUGHT QTY: 1 on 2019-06-27 00:00:00 at the price of 363.2
SOLD QTY: -1 on 2019-07-24 00:00:00 at the price of 310.51
BOUGHT QTY: 1 on 2019-10-23 00:00:00 at the price of 268.06
SOLD QTY: -1 on 2019-11-15 00:00:00 at the price of 290.59
BOUGHT QTY: 1 on 2019-11-19 00:00:00 at the price of 304.01
SOLD QTY: -1 on 2020-03-13 00:00:00 at the price of 330.51
BOUGHT QTY: 1 on 2020-04-13 00:00:00 at the price of 371.31
SOLD QTY: -1 on 2020-05-20 00:00:00 at the price of 454.25
BOUGHT QTY: 1 on 2020-05-21 00:00:00 at the price of 448.56
SOLD QTY: -1 on 2020-06-09 00:00:00 at the price of 421.65
BOUGHT QTY: 1 on 2020-06-25 00:00:00 at the price of 458.86
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-11 1 1 330.96 0 0
2019-02-19 -1 0 0 355.8 24.84
2019-02-21 1 1 360.03 0 0
2019-03-26 -1 0 0 367.87 7.84
2019-04-02 1 1 366.25 0 0
2019-04-18 -1 0 0 355 -11.25
2019-04-26 1 1 368.35 0 0
2019-05-22 -1 0 0 358.01 -10.34
2019-06-27 1 1 363.2 0 0
2019-07-24 -1 0 0 310.51 -52.69
2019-10-23 1 1 268.06 0 0
2019-11-15 -1 0 0 290.59 22.53
2019-11-19 1 1 304.01 0 0
2020-03-13 -1 0 0 330.51 26.5
2020-04-13 1 1 371.31 0 0
2020-05-20 -1 0 0 454.25 82.94
2020-05-21 1 1 448.56 0 0
2020-06-09 -1 0 0 421.65 -26.91
2020-06-25 1 1 458.86 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-11 -330.96 337.59 6.63 6.63
2019-02-19 24.84 0 24.84 24.84
2019-02-21 -335.19 356.97 21.78 21.78
2019-03-26 32.68 0 32.68 32.68
2019-04-02 -333.57 367.72 34.15 34.15
2019-04-18 21.43 0 21.43 21.43
2019-04-26 -346.92 374.85 27.93 27.93
2019-05-22 11.09 0 11.09 11.09
2019-06-27 -352.11 370.02 17.91 17.91
2019-07-24 -41.6 0 -41.6 -41.6
2019-10-23 -309.66 271.27 -38.39 -38.39
2019-11-15 -19.07 0 -19.07 -19.07
2019-11-19 -323.08 302.6 -20.48 -20.48
2020-03-13 7.43 0 7.43 7.43
2020-04-13 -363.88 396.72 32.84 32.84
2020-05-20 90.37 0 90.37 90.37
2020-05-21 -358.19 436.25 78.06 78.06
2020-06-09 63.46 0 63.46 63.46
2020-06-25 -395.4 465.91 70.51 70.51
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $90.24
The current status of the model is: Holding a position since 2020-06-25 00:00:00
Processing portfolio for model: SMA_011_SlowMA_30_FastMA_05
BOUGHT QTY: 1 on 2019-01-07 00:00:00 at the price of 302.1
SOLD QTY: -1 on 2019-03-29 00:00:00 at the price of 357.16
BOUGHT QTY: 1 on 2019-04-04 00:00:00 at the price of 370.07
SOLD QTY: -1 on 2019-04-16 00:00:00 at the price of 355.0
BOUGHT QTY: 1 on 2019-04-24 00:00:00 at the price of 381.07
SOLD QTY: -1 on 2019-05-13 00:00:00 at the price of 352.29
BOUGHT QTY: 1 on 2019-06-21 00:00:00 at the price of 365.0
SOLD QTY: -1 on 2019-07-19 00:00:00 at the price of 323.4
BOUGHT QTY: 1 on 2019-10-16 00:00:00 at the price of 283.12
SOLD QTY: -1 on 2019-10-25 00:00:00 at the price of 270.68
BOUGHT QTY: 1 on 2019-10-30 00:00:00 at the price of 284.34
SOLD QTY: -1 on 2019-12-16 00:00:00 at the price of 300.85
BOUGHT QTY: 1 on 2019-12-18 00:00:00 at the price of 316.26
SOLD QTY: -1 on 2020-03-10 00:00:00 at the price of 356.425
BOUGHT QTY: 1 on 2020-03-31 00:00:00 at the price of 367.93
SOLD QTY: -1 on 2020-05-28 00:00:00 at the price of 417.24
BOUGHT QTY: 1 on 2020-06-19 00:00:00 at the price of 449.12
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-07 1 1 302.1 0 0
2019-03-29 -1 0 0 357.16 55.06
2019-04-04 1 1 370.07 0 0
2019-04-16 -1 0 0 355 -15.07
2019-04-24 1 1 381.07 0 0
2019-05-13 -1 0 0 352.29 -28.78
2019-06-21 1 1 365 0 0
2019-07-19 -1 0 0 323.4 -41.6
2019-10-16 1 1 283.12 0 0
2019-10-25 -1 0 0 270.68 -12.44
2019-10-30 1 1 284.34 0 0
2019-12-16 -1 0 0 300.85 16.51
2019-12-18 1 1 316.26 0 0
2020-03-10 -1 0 0 356.425 40.165
2020-03-31 1 1 367.93 0 0
2020-05-28 -1 0 0 417.24 49.31
2020-06-19 1 1 449.12 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-07 -302.1 315.34 13.24 13.24
2019-03-29 55.06 0 55.06 55.06
2019-04-04 -315.01 367.88 52.87 52.87
2019-04-16 39.99 0 39.99 39.99
2019-04-24 -341.08 374.23 33.15 33.15
2019-05-13 11.21 0 11.21 11.21
2019-06-21 -353.79 369.21 15.42 15.42
2019-07-19 -30.39 0 -30.39 -30.39
2019-10-16 -313.51 286.28 -27.23 -27.23
2019-10-25 -42.83 0 -42.83 -42.83
2019-10-30 -327.17 291.45 -35.72 -35.72
2019-12-16 -26.32 0 -26.32 -26.32
2019-12-18 -342.58 320.8 -21.78 -21.78
2020-03-10 13.845 0 13.845 13.845
2020-03-31 -354.085 375.5 21.415 21.415
2020-05-28 63.155 0 63.155 63.155
2020-06-19 -385.965 453.72 67.755 67.755
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $99.68
The current status of the model is: Holding a position since 2020-06-19 00:00:00
Processing portfolio for model: SMA_012_SlowMA_30_FastMA_10
BOUGHT QTY: 1 on 2019-01-09 00:00:00 at the price of 317.71
SOLD QTY: -1 on 2019-04-18 00:00:00 at the price of 355.0
BOUGHT QTY: 1 on 2019-04-25 00:00:00 at the price of 374.49
SOLD QTY: -1 on 2019-05-16 00:00:00 at the price of 356.37
BOUGHT QTY: 1 on 2019-06-21 00:00:00 at the price of 365.0
SOLD QTY: -1 on 2019-07-23 00:00:00 at the price of 311.44
BOUGHT QTY: 1 on 2019-10-18 00:00:00 at the price of 289.36
SOLD QTY: -1 on 2020-03-12 00:00:00 at the price of 326.5
BOUGHT QTY: 1 on 2020-04-03 00:00:00 at the price of 367.36
SOLD QTY: -1 on 2020-06-03 00:00:00 at the price of 426.95
BOUGHT QTY: 1 on 2020-06-22 00:00:00 at the price of 455.01
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-09 1 1 317.71 0 0
2019-04-18 -1 0 0 355 37.29
2019-04-25 1 1 374.49 0 0
2019-05-16 -1 0 0 356.37 -18.12
2019-06-21 1 1 365 0 0
2019-07-23 -1 0 0 311.44 -53.56
2019-10-18 1 1 289.36 0 0
2020-03-12 -1 0 0 326.5 37.14
2020-04-03 1 1 367.36 0 0
2020-06-03 -1 0 0 426.95 59.59
2020-06-22 1 1 455.01 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-09 -317.71 319.96 2.25 2.25
2019-04-18 37.29 0 37.29 37.29
2019-04-25 -337.2 368.33 31.13 31.13
2019-05-16 19.17 0 19.17 19.17
2019-06-21 -345.83 369.21 23.38 23.38
2019-07-23 -34.39 0 -34.39 -34.39
2019-10-18 -323.75 275.3 -48.45 -48.45
2020-03-12 2.75 0 2.75 2.75
2020-04-03 -364.61 361.76 -2.85 -2.85
2020-06-03 62.34 0 62.34 62.34
2020-06-22 -392.67 468.04 75.37 75.37
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $92.97
The current status of the model is: Holding a position since 2020-06-22 00:00:00
Processing portfolio for model: SMA_013_SlowMA_30_FastMA_15
BOUGHT QTY: 1 on 2019-01-11 00:00:00 at the price of 330.96
SOLD QTY: -1 on 2019-04-17 00:00:00 at the price of 365.05
BOUGHT QTY: 1 on 2019-04-18 00:00:00 at the price of 355.0
SOLD QTY: -1 on 2019-05-21 00:00:00 at the price of 350.95
BOUGHT QTY: 1 on 2019-06-24 00:00:00 at the price of 370.27
SOLD QTY: -1 on 2019-07-24 00:00:00 at the price of 310.51
BOUGHT QTY: 1 on 2019-10-24 00:00:00 at the price of 271.81
SOLD QTY: -1 on 2020-03-13 00:00:00 at the price of 330.51
BOUGHT QTY: 1 on 2020-04-08 00:00:00 at the price of 374.01
SOLD QTY: -1 on 2020-06-09 00:00:00 at the price of 421.65
BOUGHT QTY: 1 on 2020-06-24 00:00:00 at the price of 468.54
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-11 1 1 330.96 0 0
2019-04-17 -1 0 0 365.05 34.09
2019-04-18 1 1 355 0 0
2019-05-21 -1 0 0 350.95 -4.05
2019-06-24 1 1 370.27 0 0
2019-07-24 -1 0 0 310.51 -59.76
2019-10-24 1 1 271.81 0 0
2020-03-13 -1 0 0 330.51 58.7
2020-04-08 1 1 374.01 0 0
2020-06-09 -1 0 0 421.65 47.64
2020-06-24 1 1 468.54 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-11 -330.96 337.59 6.63 6.63
2019-04-17 34.09 0 34.09 34.09
2019-04-18 -320.91 360.35 39.44 39.44
2019-05-21 30.04 0 30.04 30.04
2019-06-24 -340.23 371.04 30.81 30.81
2019-07-24 -29.72 0 -29.72 -29.72
2019-10-24 -301.53 271.5 -30.03 -30.03
2020-03-13 28.98 0 28.98 28.98
2020-04-08 -345.03 371.12 26.09 26.09
2020-06-09 76.62 0 76.62 76.62
2020-06-24 -391.92 457.85 65.93 65.93
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $93.72
The current status of the model is: Holding a position since 2020-06-24 00:00:00
Processing portfolio for model: SMA_014_SlowMA_30_FastMA_20
BOUGHT QTY: 1 on 2019-01-14 00:00:00 at the price of 334.24
SOLD QTY: -1 on 2019-03-28 00:00:00 at the price of 354.485
BOUGHT QTY: 1 on 2019-04-02 00:00:00 at the price of 366.25
SOLD QTY: -1 on 2019-04-22 00:00:00 at the price of 359.7
BOUGHT QTY: 1 on 2019-04-26 00:00:00 at the price of 368.35
SOLD QTY: -1 on 2019-05-24 00:00:00 at the price of 355.41
BOUGHT QTY: 1 on 2019-06-25 00:00:00 at the price of 370.75
SOLD QTY: -1 on 2019-07-26 00:00:00 at the price of 328.79
BOUGHT QTY: 1 on 2019-10-28 00:00:00 at the price of 278.05
SOLD QTY: -1 on 2020-03-16 00:00:00 at the price of 306.63
BOUGHT QTY: 1 on 2020-04-15 00:00:00 at the price of 413.0
SOLD QTY: -1 on 2020-06-12 00:00:00 at the price of 429.0
BOUGHT QTY: 1 on 2020-06-26 00:00:00 at the price of 466.39
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-14 1 1 334.24 0 0
2019-03-28 -1 0 0 354.485 20.245
2019-04-02 1 1 366.25 0 0
2019-04-22 -1 0 0 359.7 -6.55
2019-04-26 1 1 368.35 0 0
2019-05-24 -1 0 0 355.41 -12.94
2019-06-25 1 1 370.75 0 0
2019-07-26 -1 0 0 328.79 -41.96
2019-10-28 1 1 278.05 0 0
2020-03-16 -1 0 0 306.63 28.58
2020-04-15 1 1 413 0 0
2020-06-12 -1 0 0 429 16
2020-06-26 1 1 466.39 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-14 -334.24 332.94 -1.3 -1.3
2019-03-28 20.245 0 20.245 20.245
2019-04-02 -346.005 367.72 21.715 21.715
2019-04-22 13.695 0 13.695 13.695
2019-04-26 -354.655 374.85 20.195 20.195
2019-05-24 0.755 0 0.755 0.755
2019-06-25 -369.995 360.3 -9.695 -9.695
2019-07-26 -41.205 0 -41.205 -41.205
2019-10-28 -319.255 281.86 -37.395 -37.395
2020-03-16 -12.625 0 -12.625 -12.625
2020-04-15 -425.625 426.75 1.125 1.125
2020-06-12 3.375 0 3.375 3.375
2020-06-26 -463.015 443.4 -19.615 -19.615
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $22.62
The current status of the model is: Holding a position since 2020-06-26 00:00:00
Processing portfolio for model: SMA_015_SlowMA_35_FastMA_05
BOUGHT QTY: 1 on 2019-01-07 00:00:00 at the price of 302.1
SOLD QTY: -1 on 2019-04-01 00:00:00 at the price of 359.0
BOUGHT QTY: 1 on 2019-04-04 00:00:00 at the price of 370.07
SOLD QTY: -1 on 2019-04-16 00:00:00 at the price of 355.0
BOUGHT QTY: 1 on 2019-04-24 00:00:00 at the price of 381.07
SOLD QTY: -1 on 2019-05-14 00:00:00 at the price of 348.71
BOUGHT QTY: 1 on 2019-06-24 00:00:00 at the price of 370.27
SOLD QTY: -1 on 2019-07-19 00:00:00 at the price of 323.4
BOUGHT QTY: 1 on 2019-10-17 00:00:00 at the price of 304.49
SOLD QTY: -1 on 2019-10-24 00:00:00 at the price of 271.81
BOUGHT QTY: 1 on 2019-10-31 00:00:00 at the price of 291.0
SOLD QTY: -1 on 2020-03-12 00:00:00 at the price of 326.5
BOUGHT QTY: 1 on 2020-04-01 00:00:00 at the price of 376.05
SOLD QTY: -1 on 2020-05-29 00:00:00 at the price of 417.46
BOUGHT QTY: 1 on 2020-06-18 00:00:00 at the price of 448.73
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-07 1 1 302.1 0 0
2019-04-01 -1 0 0 359 56.9
2019-04-04 1 1 370.07 0 0
2019-04-16 -1 0 0 355 -15.07
2019-04-24 1 1 381.07 0 0
2019-05-14 -1 0 0 348.71 -32.36
2019-06-24 1 1 370.27 0 0
2019-07-19 -1 0 0 323.4 -46.87
2019-10-17 1 1 304.49 0 0
2019-10-24 -1 0 0 271.81 -32.68
2019-10-31 1 1 291 0 0
2020-03-12 -1 0 0 326.5 35.5
2020-04-01 1 1 376.05 0 0
2020-05-29 -1 0 0 417.46 41.41
2020-06-18 1 1 448.73 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-07 -302.1 315.34 13.24 13.24
2019-04-01 56.9 0 56.9 56.9
2019-04-04 -313.17 367.88 54.71 54.71
2019-04-16 41.83 0 41.83 41.83
2019-04-24 -339.24 374.23 34.99 34.99
2019-05-14 9.47 0 9.47 9.47
2019-06-24 -360.8 371.04 10.24 10.24
2019-07-19 -37.4 0 -37.4 -37.4
2019-10-17 -341.89 293.35 -48.54 -48.54
2019-10-24 -70.08 0 -70.08 -70.08
2019-10-31 -361.08 287.41 -73.67 -73.67
2020-03-12 -34.58 0 -34.58 -34.58
2020-04-01 -410.63 364.08 -46.55 -46.55
2020-05-29 6.83 0 6.83 6.83
2020-06-18 -441.9 449.87 7.97 7.97
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $43.74
The current status of the model is: Holding a position since 2020-06-18 00:00:00
Processing portfolio for model: SMA_016_SlowMA_35_FastMA_10
BOUGHT QTY: 1 on 2019-01-09 00:00:00 at the price of 317.71
SOLD QTY: -1 on 2019-04-22 00:00:00 at the price of 359.7
BOUGHT QTY: 1 on 2019-04-24 00:00:00 at the price of 381.07
SOLD QTY: -1 on 2019-05-16 00:00:00 at the price of 356.37
BOUGHT QTY: 1 on 2019-06-25 00:00:00 at the price of 370.75
SOLD QTY: -1 on 2019-07-23 00:00:00 at the price of 311.44
BOUGHT QTY: 1 on 2019-10-22 00:00:00 at the price of 271.159
SOLD QTY: -1 on 2020-03-13 00:00:00 at the price of 330.51
BOUGHT QTY: 1 on 2020-04-06 00:00:00 at the price of 365.22
SOLD QTY: -1 on 2020-06-03 00:00:00 at the price of 426.95
BOUGHT QTY: 1 on 2020-06-19 00:00:00 at the price of 449.12
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-09 1 1 317.71 0 0
2019-04-22 -1 0 0 359.7 41.99
2019-04-24 1 1 381.07 0 0
2019-05-16 -1 0 0 356.37 -24.7
2019-06-25 1 1 370.75 0 0
2019-07-23 -1 0 0 311.44 -59.31
2019-10-22 1 1 271.159 0 0
2020-03-13 -1 0 0 330.51 59.351
2020-04-06 1 1 365.22 0 0
2020-06-03 -1 0 0 426.95 61.73
2020-06-19 1 1 449.12 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-09 -317.71 319.96 2.25 2.25
2019-04-22 41.99 0 41.99 41.99
2019-04-24 -339.08 374.23 35.15 35.15
2019-05-16 17.29 0 17.29 17.29
2019-06-25 -353.46 360.3 6.84 6.84
2019-07-23 -42.02 0 -42.02 -42.02
2019-10-22 -313.179 266.69 -46.489 -46.489
2020-03-13 17.331 0 17.331 17.331
2020-04-06 -347.889 379.96 32.071 32.071
2020-06-03 79.061 0 79.061 79.061
2020-06-19 -370.059 453.72 83.661 83.661
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $115.58
The current status of the model is: Holding a position since 2020-06-19 00:00:00
Processing portfolio for model: SMA_017_SlowMA_35_FastMA_15
BOUGHT QTY: 1 on 2019-01-10 00:00:00 at the price of 314.57
SOLD QTY: -1 on 2019-05-21 00:00:00 at the price of 350.95
BOUGHT QTY: 1 on 2019-06-25 00:00:00 at the price of 370.75
SOLD QTY: -1 on 2019-07-25 00:00:00 at the price of 318.86
BOUGHT QTY: 1 on 2019-10-28 00:00:00 at the price of 278.05
SOLD QTY: -1 on 2020-03-13 00:00:00 at the price of 330.51
BOUGHT QTY: 1 on 2020-04-09 00:00:00 at the price of 371.06
SOLD QTY: -1 on 2020-06-09 00:00:00 at the price of 421.65
BOUGHT QTY: 1 on 2020-06-24 00:00:00 at the price of 468.54
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-10 1 1 314.57 0 0
2019-05-21 -1 0 0 350.95 36.38
2019-06-25 1 1 370.75 0 0
2019-07-25 -1 0 0 318.86 -51.89
2019-10-28 1 1 278.05 0 0
2020-03-13 -1 0 0 330.51 52.46
2020-04-09 1 1 371.06 0 0
2020-06-09 -1 0 0 421.65 50.59
2020-06-24 1 1 468.54 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-10 -314.57 324.66 10.09 10.09
2019-05-21 36.38 0 36.38 36.38
2019-06-25 -334.37 360.3 25.93 25.93
2019-07-25 -15.51 0 -15.51 -15.51
2019-10-28 -293.56 281.86 -11.7 -11.7
2020-03-13 36.95 0 36.95 36.95
2020-04-09 -334.11 370.72 36.61 36.61
2020-06-09 87.54 0 87.54 87.54
2020-06-24 -381 457.85 76.85 76.85
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $104.64
The current status of the model is: Holding a position since 2020-06-24 00:00:00
Processing portfolio for model: SMA_018_SlowMA_35_FastMA_20
BOUGHT QTY: 1 on 2019-01-11 00:00:00 at the price of 330.96
SOLD QTY: -1 on 2019-05-23 00:00:00 at the price of 355.5
BOUGHT QTY: 1 on 2019-06-28 00:00:00 at the price of 370.26
SOLD QTY: -1 on 2019-07-29 00:00:00 at the price of 335.98
BOUGHT QTY: 1 on 2019-10-31 00:00:00 at the price of 291.0
SOLD QTY: -1 on 2020-03-18 00:00:00 at the price of 302.395
BOUGHT QTY: 1 on 2020-04-15 00:00:00 at the price of 413.0
SOLD QTY: -1 on 2020-06-16 00:00:00 at the price of 425.76
BOUGHT QTY: 1 on 2020-06-26 00:00:00 at the price of 466.39
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-11 1 1 330.96 0 0
2019-05-23 -1 0 0 355.5 24.54
2019-06-28 1 1 370.26 0 0
2019-07-29 -1 0 0 335.98 -34.28
2019-10-31 1 1 291 0 0
2020-03-18 -1 0 0 302.395 11.395
2020-04-15 1 1 413 0 0
2020-06-16 -1 0 0 425.76 12.76
2020-06-26 1 1 466.39 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-11 -330.96 337.59 6.63 6.63
2019-05-23 24.54 0 24.54 24.54
2019-06-28 -345.72 367.32 21.6 21.6
2019-07-29 -9.74 0 -9.74 -9.74
2019-10-31 -300.74 287.41 -13.33 -13.33
2020-03-18 1.655 0 1.655 1.655
2020-04-15 -411.345 426.75 15.405 15.405
2020-06-16 14.415 0 14.415 14.415
2020-06-26 -451.975 443.4 -8.575 -8.575
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $33.67
The current status of the model is: Holding a position since 2020-06-26 00:00:00
Processing portfolio for model: SMA_019_SlowMA_40_FastMA_05
BOUGHT QTY: 1 on 2019-01-08 00:00:00 at the price of 319.98
SOLD QTY: -1 on 2019-04-02 00:00:00 at the price of 366.25
BOUGHT QTY: 1 on 2019-04-03 00:00:00 at the price of 369.26
SOLD QTY: -1 on 2019-04-16 00:00:00 at the price of 355.0
BOUGHT QTY: 1 on 2019-04-24 00:00:00 at the price of 381.07
SOLD QTY: -1 on 2019-05-14 00:00:00 at the price of 348.71
BOUGHT QTY: 1 on 2019-06-24 00:00:00 at the price of 370.27
SOLD QTY: -1 on 2019-07-19 00:00:00 at the price of 323.4
BOUGHT QTY: 1 on 2019-10-17 00:00:00 at the price of 304.49
SOLD QTY: -1 on 2019-10-23 00:00:00 at the price of 268.06
BOUGHT QTY: 1 on 2019-10-31 00:00:00 at the price of 291.0
SOLD QTY: -1 on 2020-03-12 00:00:00 at the price of 326.5
BOUGHT QTY: 1 on 2020-04-01 00:00:00 at the price of 376.05
SOLD QTY: -1 on 2020-06-01 00:00:00 at the price of 418.83
BOUGHT QTY: 1 on 2020-06-18 00:00:00 at the price of 448.73
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-08 1 1 319.98 0 0
2019-04-02 -1 0 0 366.25 46.27
2019-04-03 1 1 369.26 0 0
2019-04-16 -1 0 0 355 -14.26
2019-04-24 1 1 381.07 0 0
2019-05-14 -1 0 0 348.71 -32.36
2019-06-24 1 1 370.27 0 0
2019-07-19 -1 0 0 323.4 -46.87
2019-10-17 1 1 304.49 0 0
2019-10-23 -1 0 0 268.06 -36.43
2019-10-31 1 1 291 0 0
2020-03-12 -1 0 0 326.5 35.5
2020-04-01 1 1 376.05 0 0
2020-06-01 -1 0 0 418.83 42.78
2020-06-18 1 1 448.73 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-08 -319.98 320.27 0.29 0.29
2019-04-02 46.27 0 46.27 46.27
2019-04-03 -322.99 369.75 46.76 46.76
2019-04-16 32.01 0 32.01 32.01
2019-04-24 -349.06 374.23 25.17 25.17
2019-05-14 -0.35 0 -0.35 -0.35
2019-06-24 -370.62 371.04 0.42 0.42
2019-07-19 -47.22 0 -47.22 -47.22
2019-10-17 -351.71 293.35 -58.36 -58.36
2019-10-23 -83.65 0 -83.65 -83.65
2019-10-31 -374.65 287.41 -87.24 -87.24
2020-03-12 -48.15 0 -48.15 -48.15
2020-04-01 -424.2 364.08 -60.12 -60.12
2020-06-01 -5.37 0 -5.37 -5.37
2020-06-18 -454.1 449.87 -4.23 -4.23
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $31.54
The current status of the model is: Holding a position since 2020-06-18 00:00:00
Processing portfolio for model: SMA_020_SlowMA_40_FastMA_10
BOUGHT QTY: 1 on 2019-01-10 00:00:00 at the price of 314.57
SOLD QTY: -1 on 2019-04-18 00:00:00 at the price of 355.0
BOUGHT QTY: 1 on 2019-04-24 00:00:00 at the price of 381.07
SOLD QTY: -1 on 2019-05-16 00:00:00 at the price of 356.37
BOUGHT QTY: 1 on 2019-06-27 00:00:00 at the price of 363.2
SOLD QTY: -1 on 2019-07-23 00:00:00 at the price of 311.44
BOUGHT QTY: 1 on 2019-11-04 00:00:00 at the price of 288.0
SOLD QTY: -1 on 2020-03-16 00:00:00 at the price of 306.63
BOUGHT QTY: 1 on 2020-04-06 00:00:00 at the price of 365.22
SOLD QTY: -1 on 2020-06-05 00:00:00 at the price of 407.29
BOUGHT QTY: 1 on 2020-06-19 00:00:00 at the price of 449.12
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-10 1 1 314.57 0 0
2019-04-18 -1 0 0 355 40.43
2019-04-24 1 1 381.07 0 0
2019-05-16 -1 0 0 356.37 -24.7
2019-06-27 1 1 363.2 0 0
2019-07-23 -1 0 0 311.44 -51.76
2019-11-04 1 1 288 0 0
2020-03-16 -1 0 0 306.63 18.63
2020-04-06 1 1 365.22 0 0
2020-06-05 -1 0 0 407.29 42.07
2020-06-19 1 1 449.12 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-10 -314.57 324.66 10.09 10.09
2019-04-18 40.43 0 40.43 40.43
2019-04-24 -340.64 374.23 33.59 33.59
2019-05-16 15.73 0 15.73 15.73
2019-06-27 -347.47 370.02 22.55 22.55
2019-07-23 -36.03 0 -36.03 -36.03
2019-11-04 -324.03 292.86 -31.17 -31.17
2020-03-16 -17.4 0 -17.4 -17.4
2020-04-06 -382.62 379.96 -2.66 -2.66
2020-06-05 24.67 0 24.67 24.67
2020-06-19 -424.45 453.72 29.27 29.27
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $61.19
The current status of the model is: Holding a position since 2020-06-19 00:00:00
Processing portfolio for model: SMA_021_SlowMA_40_FastMA_15
BOUGHT QTY: 1 on 2019-01-11 00:00:00 at the price of 330.96
SOLD QTY: -1 on 2019-05-21 00:00:00 at the price of 350.95
BOUGHT QTY: 1 on 2019-06-28 00:00:00 at the price of 370.26
SOLD QTY: -1 on 2019-07-25 00:00:00 at the price of 318.86
BOUGHT QTY: 1 on 2019-10-31 00:00:00 at the price of 291.0
SOLD QTY: -1 on 2020-03-17 00:00:00 at the price of 306.18
BOUGHT QTY: 1 on 2020-04-13 00:00:00 at the price of 371.31
SOLD QTY: -1 on 2020-06-10 00:00:00 at the price of 436.0
BOUGHT QTY: 1 on 2020-06-22 00:00:00 at the price of 455.01
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-11 1 1 330.96 0 0
2019-05-21 -1 0 0 350.95 19.99
2019-06-28 1 1 370.26 0 0
2019-07-25 -1 0 0 318.86 -51.4
2019-10-31 1 1 291 0 0
2020-03-17 -1 0 0 306.18 15.18
2020-04-13 1 1 371.31 0 0
2020-06-10 -1 0 0 436 64.69
2020-06-22 1 1 455.01 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-11 -330.96 337.59 6.63 6.63
2019-05-21 19.99 0 19.99 19.99
2019-06-28 -350.27 367.32 17.05 17.05
2019-07-25 -31.41 0 -31.41 -31.41
2019-10-31 -322.41 287.41 -35 -35
2020-03-17 -16.23 0 -16.23 -16.23
2020-04-13 -387.54 396.72 9.18 9.18
2020-06-10 48.46 0 48.46 48.46
2020-06-22 -406.55 468.04 61.49 61.49
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $79.09
The current status of the model is: Holding a position since 2020-06-22 00:00:00
Processing portfolio for model: SMA_022_SlowMA_40_FastMA_20
BOUGHT QTY: 1 on 2019-01-14 00:00:00 at the price of 334.24
SOLD QTY: -1 on 2019-05-24 00:00:00 at the price of 355.41
BOUGHT QTY: 1 on 2019-07-02 00:00:00 at the price of 374.89
SOLD QTY: -1 on 2019-07-29 00:00:00 at the price of 335.98
BOUGHT QTY: 1 on 2019-11-01 00:00:00 at the price of 288.7
SOLD QTY: -1 on 2020-03-19 00:00:00 at the price of 324.33
BOUGHT QTY: 1 on 2020-04-16 00:00:00 at the price of 437.0
SOLD QTY: -1 on 2020-06-16 00:00:00 at the price of 425.76
BOUGHT QTY: 1 on 2020-06-25 00:00:00 at the price of 458.86
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-14 1 1 334.24 0 0
2019-05-24 -1 0 0 355.41 21.17
2019-07-02 1 1 374.89 0 0
2019-07-29 -1 0 0 335.98 -38.91
2019-11-01 1 1 288.7 0 0
2020-03-19 -1 0 0 324.33 35.63
2020-04-16 1 1 437 0 0
2020-06-16 -1 0 0 425.76 -11.24
2020-06-25 1 1 458.86 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-14 -334.24 332.94 -1.3 -1.3
2019-05-24 21.17 0 21.17 21.17
2019-07-02 -353.72 375.43 21.71 21.71
2019-07-29 -17.74 0 -17.74 -17.74
2019-11-01 -306.44 286.81 -19.63 -19.63
2020-03-19 17.89 0 17.89 17.89
2020-04-16 -419.11 439.17 20.06 20.06
2020-06-16 6.65 0 6.65 6.65
2020-06-25 -452.21 465.91 13.7 13.7
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $33.43
The current status of the model is: Holding a position since 2020-06-25 00:00:00
Processing portfolio for model: SMA_023_SlowMA_45_FastMA_05
BOUGHT QTY: 1 on 2019-01-08 00:00:00 at the price of 319.98
SOLD QTY: -1 on 2019-04-16 00:00:00 at the price of 355.0
BOUGHT QTY: 1 on 2019-04-24 00:00:00 at the price of 381.07
SOLD QTY: -1 on 2019-05-14 00:00:00 at the price of 348.71
BOUGHT QTY: 1 on 2019-06-24 00:00:00 at the price of 370.27
SOLD QTY: -1 on 2019-07-19 00:00:00 at the price of 323.4
BOUGHT QTY: 1 on 2019-10-18 00:00:00 at the price of 289.36
SOLD QTY: -1 on 2019-10-22 00:00:00 at the price of 271.159
BOUGHT QTY: 1 on 2019-10-31 00:00:00 at the price of 291.0
SOLD QTY: -1 on 2020-03-13 00:00:00 at the price of 330.51
BOUGHT QTY: 1 on 2020-04-01 00:00:00 at the price of 376.05
SOLD QTY: -1 on 2020-06-09 00:00:00 at the price of 421.65
BOUGHT QTY: 1 on 2020-06-11 00:00:00 at the price of 428.2
SOLD QTY: -1 on 2020-06-17 00:00:00 at the price of 441.82
BOUGHT QTY: 1 on 2020-06-18 00:00:00 at the price of 448.73
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-08 1 1 319.98 0 0
2019-04-16 -1 0 0 355 35.02
2019-04-24 1 1 381.07 0 0
2019-05-14 -1 0 0 348.71 -32.36
2019-06-24 1 1 370.27 0 0
2019-07-19 -1 0 0 323.4 -46.87
2019-10-18 1 1 289.36 0 0
2019-10-22 -1 0 0 271.159 -18.201
2019-10-31 1 1 291 0 0
2020-03-13 -1 0 0 330.51 39.51
2020-04-01 1 1 376.05 0 0
2020-06-09 -1 0 0 421.65 45.6
2020-06-11 1 1 428.2 0 0
2020-06-17 -1 0 0 441.82 13.62
2020-06-18 1 1 448.73 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-08 -319.98 320.27 0.29 0.29
2019-04-16 35.02 0 35.02 35.02
2019-04-24 -346.05 374.23 28.18 28.18
2019-05-14 2.66 0 2.66 2.66
2019-06-24 -367.61 371.04 3.43 3.43
2019-07-19 -44.21 0 -44.21 -44.21
2019-10-18 -333.57 275.3 -58.27 -58.27
2019-10-22 -62.411 0 -62.411 -62.411
2019-10-31 -353.411 287.41 -66.001 -66.001
2020-03-13 -22.901 0 -22.901 -22.901
2020-04-01 -398.951 364.08 -34.871 -34.871
2020-06-09 22.699 0 22.699 22.699
2020-06-11 -405.501 425.56 20.059 20.059
2020-06-17 36.319 0 36.319 36.319
2020-06-18 -412.411 449.87 37.459 37.459
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $73.23
The current status of the model is: Holding a position since 2020-06-18 00:00:00
Processing portfolio for model: SMA_024_SlowMA_45_FastMA_10
BOUGHT QTY: 1 on 2019-01-10 00:00:00 at the price of 314.57
SOLD QTY: -1 on 2019-04-22 00:00:00 at the price of 359.7
BOUGHT QTY: 1 on 2019-04-24 00:00:00 at the price of 381.07
SOLD QTY: -1 on 2019-05-16 00:00:00 at the price of 356.37
BOUGHT QTY: 1 on 2019-06-28 00:00:00 at the price of 370.26
SOLD QTY: -1 on 2019-07-23 00:00:00 at the price of 311.44
BOUGHT QTY: 1 on 2019-11-05 00:00:00 at the price of 289.99
SOLD QTY: -1 on 2020-03-16 00:00:00 at the price of 306.63
BOUGHT QTY: 1 on 2020-04-06 00:00:00 at the price of 365.22
SOLD QTY: -1 on 2020-06-09 00:00:00 at the price of 421.65
BOUGHT QTY: 1 on 2020-06-19 00:00:00 at the price of 449.12
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-10 1 1 314.57 0 0
2019-04-22 -1 0 0 359.7 45.13
2019-04-24 1 1 381.07 0 0
2019-05-16 -1 0 0 356.37 -24.7
2019-06-28 1 1 370.26 0 0
2019-07-23 -1 0 0 311.44 -58.82
2019-11-05 1 1 289.99 0 0
2020-03-16 -1 0 0 306.63 16.64
2020-04-06 1 1 365.22 0 0
2020-06-09 -1 0 0 421.65 56.43
2020-06-19 1 1 449.12 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-10 -314.57 324.66 10.09 10.09
2019-04-22 45.13 0 45.13 45.13
2019-04-24 -335.94 374.23 38.29 38.29
2019-05-16 20.43 0 20.43 20.43
2019-06-28 -349.83 367.32 17.49 17.49
2019-07-23 -38.39 0 -38.39 -38.39
2019-11-05 -328.38 288.03 -40.35 -40.35
2020-03-16 -21.75 0 -21.75 -21.75
2020-04-06 -386.97 379.96 -7.01 -7.01
2020-06-09 34.68 0 34.68 34.68
2020-06-19 -414.44 453.72 39.28 39.28
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $71.20
The current status of the model is: Holding a position since 2020-06-19 00:00:00
Processing portfolio for model: SMA_025_SlowMA_45_FastMA_15
BOUGHT QTY: 1 on 2019-01-14 00:00:00 at the price of 334.24
SOLD QTY: -1 on 2019-05-21 00:00:00 at the price of 350.95
BOUGHT QTY: 1 on 2019-07-02 00:00:00 at the price of 374.89
SOLD QTY: -1 on 2019-07-25 00:00:00 at the price of 318.86
BOUGHT QTY: 1 on 2019-10-31 00:00:00 at the price of 291.0
SOLD QTY: -1 on 2020-03-17 00:00:00 at the price of 306.18
BOUGHT QTY: 1 on 2020-04-13 00:00:00 at the price of 371.31
SOLD QTY: -1 on 2020-06-12 00:00:00 at the price of 429.0
BOUGHT QTY: 1 on 2020-06-22 00:00:00 at the price of 455.01
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-14 1 1 334.24 0 0
2019-05-21 -1 0 0 350.95 16.71
2019-07-02 1 1 374.89 0 0
2019-07-25 -1 0 0 318.86 -56.03
2019-10-31 1 1 291 0 0
2020-03-17 -1 0 0 306.18 15.18
2020-04-13 1 1 371.31 0 0
2020-06-12 -1 0 0 429 57.69
2020-06-22 1 1 455.01 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-14 -334.24 332.94 -1.3 -1.3
2019-05-21 16.71 0 16.71 16.71
2019-07-02 -358.18 375.43 17.25 17.25
2019-07-25 -39.32 0 -39.32 -39.32
2019-10-31 -330.32 287.41 -42.91 -42.91
2020-03-17 -24.14 0 -24.14 -24.14
2020-04-13 -395.45 396.72 1.27 1.27
2020-06-12 33.55 0 33.55 33.55
2020-06-22 -421.46 468.04 46.58 46.58
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $64.18
The current status of the model is: Holding a position since 2020-06-22 00:00:00
Processing portfolio for model: SMA_026_SlowMA_45_FastMA_20
BOUGHT QTY: 1 on 2019-01-16 00:00:00 at the price of 354.0
SOLD QTY: -1 on 2019-05-24 00:00:00 at the price of 355.41
BOUGHT QTY: 1 on 2019-07-03 00:00:00 at the price of 376.69
SOLD QTY: -1 on 2019-07-30 00:00:00 at the price of 329.2
BOUGHT QTY: 1 on 2019-11-05 00:00:00 at the price of 289.99
SOLD QTY: -1 on 2020-03-19 00:00:00 at the price of 324.33
BOUGHT QTY: 1 on 2020-04-16 00:00:00 at the price of 437.0
SOLD QTY: -1 on 2020-06-17 00:00:00 at the price of 441.82
BOUGHT QTY: 1 on 2020-06-24 00:00:00 at the price of 468.54
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-16 1 1 354 0 0
2019-05-24 -1 0 0 355.41 1.41
2019-07-03 1 1 376.69 0 0
2019-07-30 -1 0 0 329.2 -47.49
2019-11-05 1 1 289.99 0 0
2020-03-19 -1 0 0 324.33 34.34
2020-04-16 1 1 437 0 0
2020-06-17 -1 0 0 441.82 4.82
2020-06-24 1 1 468.54 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-16 -354 351.39 -2.61 -2.61
2019-05-24 1.41 0 1.41 1.41
2019-07-03 -375.28 381.72 6.44 6.44
2019-07-30 -46.08 0 -46.08 -46.08
2019-11-05 -336.07 288.03 -48.04 -48.04
2020-03-19 -11.74 0 -11.74 -11.74
2020-04-16 -448.74 439.17 -9.57 -9.57
2020-06-17 -6.92 0 -6.92 -6.92
2020-06-24 -475.46 457.85 -17.61 -17.61
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $10.18
The current status of the model is: Holding a position since 2020-06-24 00:00:00
Processing portfolio for model: SMA_027_SlowMA_50_FastMA_05
BOUGHT QTY: 1 on 2019-01-08 00:00:00 at the price of 319.98
SOLD QTY: -1 on 2019-04-17 00:00:00 at the price of 365.05
BOUGHT QTY: 1 on 2019-04-24 00:00:00 at the price of 381.07
SOLD QTY: -1 on 2019-05-14 00:00:00 at the price of 348.71
BOUGHT QTY: 1 on 2019-06-24 00:00:00 at the price of 370.27
SOLD QTY: -1 on 2019-07-19 00:00:00 at the price of 323.4
BOUGHT QTY: 1 on 2019-11-01 00:00:00 at the price of 288.7
SOLD QTY: -1 on 2020-03-13 00:00:00 at the price of 330.51
BOUGHT QTY: 1 on 2020-03-31 00:00:00 at the price of 367.93
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-08 1 1 319.98 0 0
2019-04-17 -1 0 0 365.05 45.07
2019-04-24 1 1 381.07 0 0
2019-05-14 -1 0 0 348.71 -32.36
2019-06-24 1 1 370.27 0 0
2019-07-19 -1 0 0 323.4 -46.87
2019-11-01 1 1 288.7 0 0
2020-03-13 -1 0 0 330.51 41.81
2020-03-31 1 1 367.93 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-08 -319.98 320.27 0.29 0.29
2019-04-17 45.07 0 45.07 45.07
2019-04-24 -336 374.23 38.23 38.23
2019-05-14 12.71 0 12.71 12.71
2019-06-24 -357.56 371.04 13.48 13.48
2019-07-19 -34.16 0 -34.16 -34.16
2019-11-01 -322.86 286.81 -36.05 -36.05
2020-03-13 7.65 0 7.65 7.65
2020-03-31 -360.28 375.5 15.22 15.22
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $125.36
The current status of the model is: Holding a position since 2020-03-31 00:00:00
Processing portfolio for model: SMA_028_SlowMA_50_FastMA_10
BOUGHT QTY: 1 on 2019-01-10 00:00:00 at the price of 314.57
SOLD QTY: -1 on 2019-05-17 00:00:00 at the price of 356.39
BOUGHT QTY: 1 on 2019-06-28 00:00:00 at the price of 370.26
SOLD QTY: -1 on 2019-07-23 00:00:00 at the price of 311.44
BOUGHT QTY: 1 on 2019-11-06 00:00:00 at the price of 288.19
SOLD QTY: -1 on 2020-03-17 00:00:00 at the price of 306.18
BOUGHT QTY: 1 on 2020-04-06 00:00:00 at the price of 365.22
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-10 1 1 314.57 0 0
2019-05-17 -1 0 0 356.39 41.82
2019-06-28 1 1 370.26 0 0
2019-07-23 -1 0 0 311.44 -58.82
2019-11-06 1 1 288.19 0 0
2020-03-17 -1 0 0 306.18 17.99
2020-04-06 1 1 365.22 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-10 -314.57 324.66 10.09 10.09
2019-05-17 41.82 0 41.82 41.82
2019-06-28 -328.44 367.32 38.88 38.88
2019-07-23 -17 0 -17 -17
2019-11-06 -305.19 288.59 -16.6 -16.6
2020-03-17 0.99 0 0.99 0.99
2020-04-06 -364.23 379.96 15.73 15.73
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $121.41
The current status of the model is: Holding a position since 2020-04-06 00:00:00
Processing portfolio for model: SMA_029_SlowMA_50_FastMA_15
BOUGHT QTY: 1 on 2019-01-15 00:00:00 at the price of 349.6
SOLD QTY: -1 on 2019-05-21 00:00:00 at the price of 350.95
BOUGHT QTY: 1 on 2019-07-03 00:00:00 at the price of 376.69
SOLD QTY: -1 on 2019-07-25 00:00:00 at the price of 318.86
BOUGHT QTY: 1 on 2019-11-05 00:00:00 at the price of 289.99
SOLD QTY: -1 on 2020-03-18 00:00:00 at the price of 302.395
BOUGHT QTY: 1 on 2020-04-13 00:00:00 at the price of 371.31
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-15 1 1 349.6 0 0
2019-05-21 -1 0 0 350.95 1.35
2019-07-03 1 1 376.69 0 0
2019-07-25 -1 0 0 318.86 -57.83
2019-11-05 1 1 289.99 0 0
2020-03-18 -1 0 0 302.395 12.405
2020-04-13 1 1 371.31 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-15 -349.6 354.64 5.04 5.04
2019-05-21 1.35 0 1.35 1.35
2019-07-03 -375.34 381.72 6.38 6.38
2019-07-25 -56.48 0 -56.48 -56.48
2019-11-05 -346.47 288.03 -58.44 -58.44
2020-03-18 -44.075 0 -44.075 -44.075
2020-04-13 -415.385 396.72 -18.665 -18.665
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $70.25
The current status of the model is: Holding a position since 2020-04-13 00:00:00
Processing portfolio for model: SMA_030_SlowMA_50_FastMA_20
BOUGHT QTY: 1 on 2019-01-16 00:00:00 at the price of 354.0
SOLD QTY: -1 on 2019-05-24 00:00:00 at the price of 355.41
BOUGHT QTY: 1 on 2019-07-05 00:00:00 at the price of 378.29
SOLD QTY: -1 on 2019-07-30 00:00:00 at the price of 329.2
BOUGHT QTY: 1 on 2019-11-06 00:00:00 at the price of 288.19
SOLD QTY: -1 on 2020-03-20 00:00:00 at the price of 342.31
BOUGHT QTY: 1 on 2020-04-16 00:00:00 at the price of 437.0
SOLD QTY: -1 on 2020-06-22 00:00:00 at the price of 455.01
BOUGHT QTY: 1 on 2020-06-24 00:00:00 at the price of 468.54
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-16 1 1 354 0 0
2019-05-24 -1 0 0 355.41 1.41
2019-07-05 1 1 378.29 0 0
2019-07-30 -1 0 0 329.2 -49.09
2019-11-06 1 1 288.19 0 0
2020-03-20 -1 0 0 342.31 54.12
2020-04-16 1 1 437 0 0
2020-06-22 -1 0 0 455.01 18.01
2020-06-24 1 1 468.54 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-16 -354 351.39 -2.61 -2.61
2019-05-24 1.41 0 1.41 1.41
2019-07-05 -376.88 380.55 3.67 3.67
2019-07-30 -47.68 0 -47.68 -47.68
2019-11-06 -335.87 288.59 -47.28 -47.28
2020-03-20 6.44 0 6.44 6.44
2020-04-16 -430.56 439.17 8.61 8.61
2020-06-22 24.45 0 24.45 24.45
2020-06-24 -444.09 457.85 13.76 13.76
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $41.55
The current status of the model is: Holding a position since 2020-06-24 00:00:00
# Display the model performance summary
performance_summary.sort_values(by=['return_value'], inplace=True, ascending=False)
print(performance_summary)
model_name return_value return_percent 2 SMA_003_SlowMA_15_FastMA_10 130.655 None 26 SMA_027_SlowMA_50_FastMA_05 125.360 None 27 SMA_028_SlowMA_50_FastMA_10 121.410 None 15 SMA_016_SlowMA_35_FastMA_10 115.581 None 16 SMA_017_SlowMA_35_FastMA_15 104.640 None 10 SMA_011_SlowMA_30_FastMA_05 99.675 None 4 SMA_005_SlowMA_20_FastMA_10 97.190 None 12 SMA_013_SlowMA_30_FastMA_15 93.720 None 11 SMA_012_SlowMA_30_FastMA_10 92.970 None 9 SMA_010_SlowMA_25_FastMA_20 90.240 None 1 SMA_002_SlowMA_15_FastMA_05 85.685 None 8 SMA_009_SlowMA_25_FastMA_15 85.020 None 20 SMA_021_SlowMA_40_FastMA_15 79.090 None 22 SMA_023_SlowMA_45_FastMA_05 73.229 None 5 SMA_006_SlowMA_20_FastMA_15 71.835 None 23 SMA_024_SlowMA_45_FastMA_10 71.200 None 28 SMA_029_SlowMA_50_FastMA_15 70.255 None 7 SMA_008_SlowMA_25_FastMA_10 69.040 None 6 SMA_007_SlowMA_25_FastMA_05 66.275 None 24 SMA_025_SlowMA_45_FastMA_15 64.180 None 19 SMA_020_SlowMA_40_FastMA_10 61.190 None 3 SMA_004_SlowMA_20_FastMA_05 58.955 None 14 SMA_015_SlowMA_35_FastMA_05 43.740 None 29 SMA_030_SlowMA_50_FastMA_20 41.550 None 17 SMA_018_SlowMA_35_FastMA_20 33.665 None 21 SMA_022_SlowMA_40_FastMA_20 33.430 None 18 SMA_019_SlowMA_40_FastMA_05 31.540 None 13 SMA_014_SlowMA_30_FastMA_20 22.625 None 25 SMA_026_SlowMA_45_FastMA_20 10.180 None 0 SMA_001_SlowMA_10_FastMA_05 0.630 None
# Display the transactions from the top model
top_model = performance_summary.iloc[0]['model_name']
print('The transactions from the top model %s:' % (top_model))
print(portfolio_collection[top_model][portfolio_collection[top_model].trade_action != 0])
The transactions from the top model SMA_003_SlowMA_15_FastMA_10:
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-08 1 1 319.98 0 0
2019-02-01 -1 0 0 337.18 17.2
2019-02-07 1 1 347.9 0 0
2019-03-08 -1 0 0 345.75 -2.15
2019-03-20 1 1 358.91 0 0
2019-04-04 -1 0 0 370.07 11.16
2019-04-11 1 1 365 0 0
2019-04-18 -1 0 0 355 -10
2019-04-29 1 1 373.68 0 0
2019-05-13 -1 0 0 352.29 -21.39
2019-06-18 1 1 355.57 0 0
2019-06-25 -1 0 0 370.75 15.18
2019-06-26 1 1 361.6 0 0
2019-07-19 -1 0 0 323.4 -38.2
2019-08-08 1 1 311.03 0 0
2019-08-12 -1 0 0 305.46 -5.57
2019-10-10 1 1 265.97 0 0
2019-10-30 -1 0 0 284.34 18.37
2019-11-06 1 1 288.19 0 0
2019-12-11 -1 0 0 294.49 6.3
2019-12-23 1 1 337.76 0 0
2020-01-10 -1 0 0 337.13 -0.63
2020-01-15 1 1 338.68 0 0
2020-03-03 -1 0 0 381.03 42.35
2020-03-31 1 1 367.93 0 0
2020-05-05 -1 0 0 427.555 59.625
2020-05-13 1 1 435.69 0 0
2020-05-29 -1 0 0 417.46 -18.23
2020-06-12 1 1 429 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-08 -319.98 320.27 0.29 0.29
2019-02-01 17.2 0 17.2 17.2
2019-02-07 -330.7 344.71 14.01 14.01
2019-03-08 15.05 0 15.05 15.05
2019-03-20 -343.86 375.22 31.36 31.36
2019-04-04 26.21 0 26.21 26.21
2019-04-11 -338.79 367.65 28.86 28.86
2019-04-18 16.21 0 16.21 16.21
2019-04-29 -357.47 371.83 14.36 14.36
2019-05-13 -5.18 0 -5.18 -5.18
2019-06-18 -360.75 357.12 -3.63 -3.63
2019-06-25 10 0 10 10
2019-06-26 -351.6 362.2 10.6 10.6
2019-07-19 -28.2 0 -28.2 -28.2
2019-08-08 -339.23 315.9 -23.33 -23.33
2019-08-12 -33.77 0 -33.77 -33.77
2019-10-10 -299.74 280.48 -19.26 -19.26
2019-10-30 -15.4 0 -15.4 -15.4
2019-11-06 -303.59 288.59 -15 -15
2019-12-11 -9.1 0 -9.1 -9.1
2019-12-23 -346.86 333.1 -13.76 -13.76
2020-01-10 -9.73 0 -9.73 -9.73
2020-01-15 -348.41 339.07 -9.34 -9.34
2020-03-03 32.62 0 32.62 32.62
2020-03-31 -335.31 375.5 40.19 40.19
2020-05-05 92.245 0 92.245 92.245
2020-05-13 -343.445 438.27 94.825 94.825
2020-05-29 74.015 0 74.015 74.015
2020-06-12 -354.985 418.07 63.085 63.085
# Display the entry and exit signals for the top model
print('The trading signal changes from the top model %s:' % (top_model))
print(model_collection[top_model][model_collection[top_model].signal_change != 0])
The trading signal changes from the top model SMA_003_SlowMA_15_FastMA_10:
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-07 302.10 315.34 266.5015 266.196333 0.305167
2019-01-31 339.68 339.50 334.8880 336.673333 -1.785333
2019-02-06 357.00 352.19 340.8630 339.964000 0.899000
2019-03-07 360.16 352.60 358.7740 358.832000 -0.058000
2019-03-19 366.40 358.78 358.0650 357.618667 0.446333
2019-04-03 369.26 369.75 363.4050 363.451333 -0.046333
2019-04-10 365.79 363.92 363.9010 363.830667 0.070333
2019-04-17 365.05 354.74 360.5270 361.391333 -0.864333
2019-04-26 368.35 374.85 365.1200 364.958667 0.161333
2019-05-10 361.62 361.04 372.2560 373.280000 -1.024000
2019-06-17 342.69 350.62 350.9750 349.698667 1.276333
2019-06-24 370.27 371.04 355.6710 355.723333 -0.052333
2019-06-25 370.75 360.30 356.5740 356.183333 0.390667
2019-07-18 323.76 325.21 369.0630 370.648000 -1.585000
2019-08-07 302.56 304.29 320.4210 318.692000 1.729000
2019-08-09 313.74 308.93 316.6800 317.660000 -0.980000
2019-10-09 270.02 267.53 268.5270 268.525333 0.001667
2019-10-29 281.87 281.21 278.2330 278.870000 -0.637000
2019-11-05 289.99 288.03 282.9220 281.926000 0.996000
2019-12-10 296.12 293.12 306.9380 307.657333 -0.719333
2019-12-20 335.00 336.90 310.1100 308.785333 1.324667
2020-01-09 342.00 335.66 330.5810 330.802000 -0.221000
2020-01-14 344.40 338.69 332.7440 331.918000 0.826000
2020-03-02 373.11 381.05 376.9860 377.095333 -0.109333
2020-03-30 363.00 370.96 345.1130 341.037667 4.075333
2020-05-04 417.78 428.15 420.7310 423.148667 -2.417667
2020-05-12 442.00 431.82 427.8520 425.122667 2.729333
2020-05-28 417.24 413.44 436.1100 436.252667 -0.142667
2020-06-11 428.20 425.56 424.2440 423.740667 0.503333
trade_signal signal_change entry_exit
date
2019-01-07 1.0 1.0 0.0
2019-01-31 0.0 -1.0 0.0
2019-02-06 1.0 1.0 0.0
2019-03-07 0.0 -1.0 0.0
2019-03-19 1.0 1.0 0.0
2019-04-03 0.0 -1.0 0.0
2019-04-10 1.0 1.0 0.0
2019-04-17 0.0 -1.0 0.0
2019-04-26 1.0 1.0 0.0
2019-05-10 0.0 -1.0 0.0
2019-06-17 1.0 1.0 0.0
2019-06-24 0.0 -1.0 0.0
2019-06-25 1.0 1.0 -1.0
2019-07-18 0.0 -1.0 0.0
2019-08-07 1.0 1.0 0.0
2019-08-09 0.0 -1.0 0.0
2019-10-09 1.0 1.0 0.0
2019-10-29 0.0 -1.0 0.0
2019-11-05 1.0 1.0 0.0
2019-12-10 0.0 -1.0 0.0
2019-12-20 1.0 1.0 0.0
2020-01-09 0.0 -1.0 0.0
2020-01-14 1.0 1.0 0.0
2020-03-02 0.0 -1.0 0.0
2020-03-30 1.0 1.0 0.0
2020-05-04 0.0 -1.0 0.0
2020-05-12 1.0 1.0 0.0
2020-05-28 0.0 -1.0 0.0
2020-06-11 1.0 1.0 0.0
graph_data = model_collection[top_model].copy()
title_string = "Simple Moving Average Crossover Model for " + top_model
fig = plt.figure(figsize=(16,9))
ylabel = stock_symbol + ' price in $'
ax1 = fig.add_subplot(111, ylabel=ylabel, title=title_string)
graph_data['fast_ma'].plot(ax=ax1, color='b', lw=2.)
graph_data['slow_ma'].plot(ax=ax1, color='r', lw=2.)
graph_data['close_price'].plot(ax=ax1, color='g')
ax1.plot(graph_data.loc[graph_data.entry_exit == 1].index, graph_data.close_price[graph_data.entry_exit == 1], '^', markersize=7, color='k',label='buy')
ax1.plot(graph_data.loc[graph_data.entry_exit == -1].index, graph_data.close_price[graph_data.entry_exit == -1], 'v', markersize=7, color='k',label='sell')
plt.legend(loc='upper left')
plt.show()
best_model = ''
best_return = 0
for key in portfolio_collection:
if portfolio_collection[key]['accumu_return'][-1] > best_return:
best_model = key
best_return = portfolio_collection[best_model]['accumu_return'][-1]
print('The best model found is:', best_model)
print('The best profit/loss for the investing period is: $%.2f' % (best_return))
if initial_capital != 0:
print('The best return percentage for initial capital is: %.2f%%' % (best_return / initial_capital * 100))
The best model found is: SMA_003_SlowMA_15_FastMA_10 The best profit/loss for the investing period is: $130.65
worst_model = None
worst_return = 0
for key in portfolio_collection:
if portfolio_collection[key]['accumu_return'][-1] < worst_return:
worst_model = key
worst_return = portfolio_collection[worst_model]['accumu_return'][-1]
print('The worst model found is:', worst_model)
print('The worst profit/loss for the investing period is: $%.2f' % (worst_return))
if initial_capital != 0:
print('The worst return percentage for the initial capital is: %.2f%%' % (worst_return / initial_capital * 100))
The worst model found is: None The worst profit/loss for the investing period is: $0.00
# Calculate the stock's performance for a long-only model
model_template = model_template[model_start_date:model_end_date]
print('The performance of the long-only model from day one is: $%.2f' %(model_template.iloc[-1]['close_price'] - model_template.iloc[0]['open_price']))
The performance of the long-only model from day one is: $226.36
print ('Total time for the script:',(datetime.now() - startTimeScript))
Total time for the script: 0:01:41.416099